mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized UserMenuSubscriber
This commit is contained in:
@@ -11,6 +11,8 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
use FOS\RestBundle\Request\ParameterBag;
|
||||
|
||||
/**
|
||||
* This class is just a result of refactoring. Feel free to replace it.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
abstract class AbstractEntityMenuSubscriber implements EventSubscriberInterface
|
||||
@@ -35,9 +37,9 @@ abstract class AbstractEntityMenuSubscriber implements EventSubscriberInterface
|
||||
*/
|
||||
protected function generateShowDropdown(ItemInterface $menu, Event $event, string $route): void
|
||||
{
|
||||
$dropdown = $menu->addChild($this->trans('show'), [
|
||||
$dropdown = $menu->addChild($this->trans('format'), [
|
||||
'attributes' => [
|
||||
'icon' => 'fas fa-eye',
|
||||
'icon' => 'fas fa-file',
|
||||
'dropdown' => 'true',
|
||||
],
|
||||
]);
|
||||
@@ -71,16 +73,6 @@ abstract class AbstractEntityMenuSubscriber implements EventSubscriberInterface
|
||||
return $this->translator->trans($id, $parameter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
* @return int|string
|
||||
*/
|
||||
protected function getRequestIdentity(Event $event)
|
||||
{
|
||||
return $this->getRequestAttributs($event)->get('identity');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
|
Reference in New Issue
Block a user