installForm example

$this->subscribeEvent('Shopware\Models\Site\Site::postUpdate', 'onPostPersist');
        $this->subscribeEvent('Shopware\Models\Site\Site::postRemove', 'onPostPersist');

        $this->subscribeEvent('Shopware\Models\Form\Form::postPersist', 'onPostPersist');
        $this->subscribeEvent('Shopware\Models\Form\Form::postUpdate', 'onPostPersist');
        $this->subscribeEvent('Shopware\Models\Form\Form::postRemove', 'onPostPersist');

        $this->subscribeEvent('Shopware\Models\Form\Field::postUpdate', 'onPostPersist');
        $this->subscribeEvent('Shopware\Models\Form\Field::postPersist', 'onPostPersist');
        $this->subscribeEvent('Shopware\Models\Form\Field::postRemove', 'onPostPersist');

        $this->installForm();

        return true;
    }

    /** * @return CacheControl */
    public function initCacheControl(Enlight_Event_EventArgs $args)
    {
        return new CacheControl(
            $this->get(SessionInterface::class),
            
private function removeSnippets(PluginBootstrap $bootstrap$removeDirty)
    {
        $this->snippetHandler->removeFromDatabase($bootstrap->getPath() . '/Resources/snippets/', $removeDirty);
    }

    /** * @throws Exception */
    private function installResources(PluginBootstrap $bootstrap, Plugin $plugin)
    {
        if (is_file($bootstrap->getPath() . '/Resources/config.xml')) {
            $this->installForm($plugin$bootstrap->getPath() . '/Resources/config.xml');
        }

        if (is_file($bootstrap->getPath() . '/Resources/menu.xml')) {
            $this->installMenu($plugin$bootstrap->getPath() . '/Resources/menu.xml');
        }

        if (is_file($bootstrap->getPath() . '/Resources/cronjob.xml')) {
            $this->installCronjob($plugin$bootstrap->getPath() . '/Resources/cronjob.xml');
        }

        if (file_exists($bootstrap->getPath() . '/Resources/snippets')) {
            
Home | Imprint | This part of the site doesn't use cookies.