1 | <?php namespace Mascame\Artificer\Plugin; |
||
7 | abstract class AbstractPlugin extends AbstractExtension implements PluginInterface |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @return \Mascame\Artificer\Extension\PluginManager |
||
12 | */ |
||
13 | public function getManager() { |
||
16 | |||
17 | /** |
||
18 | * Return your plugin routes. |
||
19 | * |
||
20 | * @return \Closure|null |
||
21 | */ |
||
22 | public function getRoutes() { |
||
25 | |||
26 | /** |
||
27 | * Return your plugin menu entries. |
||
28 | * |
||
29 | * @return array|null |
||
30 | */ |
||
31 | public function getMenu() { |
||
34 | |||
35 | // TODO: this should be done in boot! getting array from getMenu |
||
36 | // public function addMenu($menu) { |
||
37 | // if (! $this->isInstalled()) { |
||
38 | // throw new \Exception('Artificer menus can\'t be added unless plugin is installed. Don\'t call this method in constructor.'); |
||
39 | // } |
||
40 | // |
||
41 | // Artificer::addMenu($menu); |
||
42 | // } |
||
43 | |||
44 | } |