mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Format code
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// src/Menu/Menu.php
|
||||
|
||||
namespace App\Menu;
|
||||
@@ -11,36 +12,35 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
class Menu
|
||||
{
|
||||
|
||||
/**
|
||||
* @var EventDispatcherInterface
|
||||
*/
|
||||
private $dispatcher;
|
||||
|
||||
|
||||
/**
|
||||
* @var FactoryInterface
|
||||
*/
|
||||
private $factory;
|
||||
|
||||
|
||||
public function __construct(FactoryInterface $factory, EventDispatcherInterface $dispatcher)
|
||||
{
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->factory = $factory;
|
||||
}
|
||||
|
||||
|
||||
public function userTopbar(RequestStack $request): ItemInterface
|
||||
{
|
||||
$menu = $this->factory->createItem('root', array(
|
||||
'childrenAttributes' => array(
|
||||
'class' => 'navbar-nav mr-auto',
|
||||
),
|
||||
));
|
||||
|
||||
$menu = $this->factory->createItem('root', [
|
||||
'childrenAttributes' => [
|
||||
'class' => 'navbar-nav mr-auto',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->dispatcher->dispatch(
|
||||
UserMenuEvent::EVENT,
|
||||
new UserMenuEvent($this->factory, $menu, $request)
|
||||
);
|
||||
|
||||
|
||||
return $menu;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user