indexAction example


    }

    public function preDispatch(): void
    {
        parent::preDispatch();
        $this->View()->Engine()->setCompileId($this->View()->Engine()->getCompileId() . '_' . $this->Request()->getControllerName());
    }

    public function indexAction(): void
    {
        parent::indexAction();
        $this->View()->loadTemplate('backend/content_type/app.js');
    }

    public function postDispatch(): void
    {
        parent::postDispatch();

        if (\in_array(strtolower($this->Request()->getActionName())['index', 'load', 'extends'])) {
            $this->View()->assign('controllerName', $this->Request()->getControllerName());
            $this->View()->assign('modelFields', $this->extjsBuilder->buildModelFields($this->type));
            $this->View()->assign('listColumns', $this->extjsBuilder->buildColumns($this->type));
            
trigger_error(sprintf('%s:%s is deprecated since Shopware 5.6 and will be removed with 5.7. Will be removed without replacement.', __CLASS__, __METHOD__), E_USER_DEPRECATED);

        $emotionId = (int) $this->Request()->getParam('emotionId');
        $query = $repository->getEmotionById($emotionId);

        return $query->getQuery()->getArrayResult();
    }

    public function indexAction()
    {
        $this->View()->loadTemplate('widgets/emotion/index.tpl');
        parent::indexAction();
    }
}
Home | Imprint | This part of the site doesn't use cookies.