Path example

return $dirs;
    }

    /** * Add View path to Smarty * * @return void */
    public function addPaths(Enlight_Event_EventArgs $arguments)
    {
        $this->Application()->Template()->addTemplateDir(
            $this->Path() . 'Views/responsive/',
            'payment',
            Enlight_Template_Manager::POSITION_APPEND
        );
    }

    /** * Called when the BackendOrderPostDispatch Event is triggered * * @return void */
    public function onBackendOrderPostDispatch(Enlight_Event_EventArgs $args)
    {
$view = $args->getSubject()->View();
        $parent = (int) $this->get('shop')->get('parentID');
        $categoryId = (int) $args->getRequest()->getParam('sCategory', $parent);

        $menu = $this->getAdvancedMenu($parent$categoryId(int) $config->get('levels'));

        $view->assign('sAdvancedMenu', $menu);
        $view->assign('columnAmount', $config->get('columnAmount'));

        $view->assign('hoverDelay', $config->get('hoverDelay'));

        $view->addTemplateDir($this->Path() . 'Views');
    }

    /** * Returns the complete menu with category path. * * @param int $category * @param int $activeCategoryId * @param int $depth * * @return array<array<string, mixed>> */
    
$this->createForm();

        return true;
    }

    /** * @return string */
    public function onGetControllerPath(Enlight_Event_EventArgs $args)
    {
        return $this->Path() . 'Cron.php';
    }

    /** * Secure cron actions according to system settings * * @param Enlight_Controller_Request_Request $request * * @return bool If cron action is authorized */
    public function authorizeCronAction($request)
    {
        
'plugin' => $bootstrap,
                ]
            );

            $plugin->setInstalled(new DateTime());
            $plugin->setUpdated(new DateTime());
            $em->flush($plugin);
            $this->write();

            $em->flush();

            $this->Application()->Container()->get(DatabaseHandler::class)->loadToDatabase($bootstrap->Path() . 'Snippets/');
            $this->Application()->Container()->get(DatabaseHandler::class)->loadToDatabase($bootstrap->Path() . 'snippets/');
            $this->Application()->Container()->get(DatabaseHandler::class)->loadToDatabase($bootstrap->Path() . 'Resources/snippet/');

            // Clear proxy cache             $this->Application()->Hooks()->getProxyFactory()->clearCache();
        }

        $db = $this->Application()->Container()->get('db');

        $resourceId = $db->fetchOne(
            "SELECT id FROM s_core_acl_resources WHERE name = 'widgets'"
        );
$this->SeoIndex()->refreshSeoIndex();
    }

    /** * Event listener function of the Enlight_Controller_Dispatcher_ControllerPath_Backend_Seo * event. This event is fired when shopware trying to access the plugin SEO controller. * * @return string */
    public function getSeoBackendController(Enlight_Event_EventArgs $arguments)
    {
        return $this->Path() . 'Controllers/Seo.php';
    }

    /** * Event listener function of the Enlight_Controller_Dispatcher_ControllerPath_Backend_SearchIndex * event. This event is fired when shopware trying to access the plugin SearchIndex controller. * * @return string */
    public function getSearchIndexBackendController(Enlight_Event_EventArgs $arguments)
    {
        return $this->Path() . 'Controllers/SearchIndex.php';
    }
return true;
    }

    /** * Event listener function of the Enlight_Controller_Dispatcher_ControllerPath_Backend_SimilarShown * event. This event is fired when shopware trying to access the plugin SimilarShown controller. * * @return string */
    public function getSimilarShownBackendController(Enlight_Event_EventArgs $arguments)
    {
        return $this->Path() . 'Controllers/SimilarShown.php';
    }

    /** * Plugin event listener function which is fired * when the similar shown resource has to be initialed. * * @return Shopware_Components_SimilarShown */
    public function initSimilarShownResource()
    {
        $this->Application()->Loader()->registerNamespace(
            

    public function getDefaultControllerPath(Enlight_Event_EventArgs $arguments)
    {
        $eventName = $arguments->getName();
        $eventName = str_replace('Enlight_Controller_Dispatcher_ControllerPath_', '', $eventName);

        $parts = explode('_', $eventName);

        $module = $parts[0];
        $controller = $parts[1];

        $path = $this->Path() . 'Controllers/' . ucfirst($module) . '/' . ucfirst($controller) . '.php';

        if (!file_exists($path)) {
            throw new Enlight_Exception(sprintf('Controller "%s" can\'t load failure', $controller));
        }

        // register plugin model directory         if (file_exists($this->Path() . 'Models')) {
            $this->registerCustomModels();
        }

        // register plugin views directory
Home | Imprint | This part of the site doesn't use cookies.