| 1 | <?php namespace Modules\Menu\Events\Handlers; |
||
| 6 | class MakeMenuItemChildOfRoot |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var MenuItemRepository |
||
| 10 | */ |
||
| 11 | private $menuItem; |
||
| 12 | |||
| 13 | public function __construct(MenuItemRepository $menuItem) |
||
| 17 | |||
| 18 | public function handle(MenuItemWasCreated $event) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Check if the given menu item is not already a root menu item |
||
| 29 | * @param object $menuItem |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | private function isRoot($menuItem) |
||
| 36 | } |
||
| 37 |