updated theme, fix deprecations in events dispatching (#1145)

This commit is contained in:
Kevin Papst
2019-09-25 19:12:12 +02:00
committed by GitHub
parent d661c8b54e
commit 8d81a394ee
16 changed files with 86 additions and 71 deletions

View File

@@ -11,7 +11,6 @@ namespace App\EventSubscriber;
use App\Event\ConfigureMainMenuEvent;
use KevinPapst\AdminLTEBundle\Event\SidebarMenuEvent;
use KevinPapst\AdminLTEBundle\Event\ThemeEvents;
use KevinPapst\AdminLTEBundle\Model\MenuItemModel;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -48,7 +47,7 @@ class MenuBuilderSubscriber implements EventSubscriberInterface
public static function getSubscribedEvents(): array
{
return [
ThemeEvents::THEME_SIDEBAR_SETUP_MENU => ['onSetupNavbar', 100],
SidebarMenuEvent::class => ['onSetupNavbar', 100],
];
}
@@ -72,7 +71,7 @@ class MenuBuilderSubscriber implements EventSubscriberInterface
new MenuItemModel('system', 'menu.system', '')
);
$this->eventDispatcher->dispatch($menuEvent, ConfigureMainMenuEvent::CONFIGURE);
$this->eventDispatcher->dispatch($menuEvent);
if ($menuEvent->getAdminMenu()->hasChildren()) {
$event->addItem(new MenuItemModel('admin', 'menu.admin', ''));