public function buildMenu(ItemInterface $node, ItemEntity $item)
    {
        if ($item->getPath() && $this->fs->exists($item->getPath())) {
            $node->addChild('Fill folder', [
                'route' => 'item_folder_filler_fill',
                'routeParameters' => [
                    'id' => $item->getId(),
                    'name' => $item->getUrlName()
                ]
            ])
                ->setLinkAttribute('class', 'icon-label icon-fill');
        }
    }
public function buildMenu(ItemInterface $node, ItemEntity $item)
    {
        if ($item->getPath() && $this->fs->exists($item->getPath())) {
            $node->addChild('Fill folder', [
                'route' => 'item_folder_filler_fill',
                'routeParameters' => [
                    'id' => $item->getId(),
                    'name' => $item->getUrlName()
                ]
            ])
                ->setLinkAttribute('class', 'icon-label icon-fill');
        }
    }
public function buildMenu ( ItemInterface $ node , ItemEntity $ item ) { if ( $ item -> getPath ( ) && $ this -> fs -> exists ( $ item -> getPath ( ) ) ) { $ node -> addChild ( 'Fill folder' , [ 'route' => 'item_folder_filler_fill' , 'routeParameters' => [ 'id' => $ item -> getId ( ) , 'name' => $ item -> getUrlName ( ) ] ] ) -> setLinkAttribute ( 'class' , 'icon-label icon-fill' ) ; } }
Build menu for plugin

@param \Knp\Menu\ItemInterface $node
@param \AnimeDb\Bundle\CatalogBundle\Entity\Item $item

@return \Knp\Menu\ItemInterface
Build menu for plugin