# neues Plugin-System: Controller registrieren

**URL:** <https://forum.shopware.com/t/neues-plugin-system-controller-registrieren/38275>\
**Category:** Programmierung\
**Created:** [15. Juli 2016 um 11:38 UTC](https://forum.shopware.com/t/neues-plugin-system-controller-registrieren/38275 "2016-07-15T11:38:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Benjamin\_Cremer](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@Benjamin\_Cremer](https://forum.shopware.com/u/Benjamin_Cremer)\
**Post date:** [15. Juli 2016 um 12:09 UTC](https://forum.shopware.com/t/neues-plugin-system-controller-registrieren/38275/2 "2016-07-15T12:09:16Z")

</div>

Hallo,

momentan gibt es noch keine „einfache“ methode controller zu registieren. Ein Separater Subscriber + services.xml ist allerdings nicht umbedingt notwendig.  
Folgender Beispielcode sollte dir weiterhelfen:

&nbsp;

```
 'registerController',
        ];
    }

    public function registerController(\Enlight_Event_EventArgs $args)
    {
        $this->container->get('template')->addTemplateDir(
            $this->getPath() . '/Resources/views/'
        );

        return $this->getPath() . "/Controllers/Frontend/MyController.php";
    }
}

```

Viele Grüße,  
Benjamin Cremer&nbsp; ![Shopware](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "Shopware")

---

_[View the full topic](https://forum.shopware.com/t/neues-plugin-system-controller-registrieren/38275)._
