mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 11:17:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Subscriber;
 | 
						|
 | 
						|
use App\Event\Menu\MenuEvent;
 | 
						|
use App\DBAL\Types\MenuEventType;
 | 
						|
 | 
						|
class SourceMenuSubscriber extends AbstractEntityMenuSubscriber
 | 
						|
{
 | 
						|
    public function onSourceMenuConfigure(MenuEvent $event): void
 | 
						|
    {
 | 
						|
        $menu = $event->getItem();
 | 
						|
        $menu->addChild($this->translator->trans('edit'), [
 | 
						|
            'route' => 'app_source_edit',
 | 
						|
            'routeParameters' => [
 | 
						|
                'id' => $this->getRequestId($event),
 | 
						|
            ],
 | 
						|
            'attributes' => [
 | 
						|
                'icon' => 'fas fa-edit',
 | 
						|
            ],
 | 
						|
        ]);
 | 
						|
        $this->generateShowDropdown($menu, $event,'app_source_show');
 | 
						|
        $menu->addChild($this->translator->trans('node'), [
 | 
						|
            'route' => 'app_source_node',
 | 
						|
            'routeParameters' => [
 | 
						|
                'id' => $this->getRequestId($event),
 | 
						|
            ],
 | 
						|
            'attributes' => [
 | 
						|
                'icon' => 'fas fa-globe',
 | 
						|
            ],
 | 
						|
        ]);
 | 
						|
    }
 | 
						|
 | 
						|
    public static function getSubscribedEvents(): array
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            MenuEventType::SOURCE => 'onSourceMenuConfigure',
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |