PHP Class Elcodi\Admin\PluginBundle\Builder\PluginMenuBuilder

Inheritance: implements Elcodi\Component\Menu\Builder\Interfaces\MenuBuilderInterface
Show file Open project: elcodi/bamboo

Protected Properties

Property Type Description
$enabledPlugins Elcodi\Component\Plugin\Entity\Plugin[] Plugins configuration
$menuNodeFactory Elcodi\Component\Menu\Factory\NodeFactory Menu node factory

Public Methods

Method Description
__construct ( Elcodi\Component\Menu\Factory\NodeFactory $menuNodeFactory, array $enabledPlugins ) Constructor
build ( Elcodi\Component\Menu\Entity\Menu\Interfaces\MenuInterface $menu ) Build the menu

Protected Methods

Method Description
filterVisiblePlugins ( ) : Elcodi\Component\Plugin\Entity\Plugin[] Return only visible plugins

Private Methods

Method Description
buildByPluginCategory ( Elcodi\Component\Menu\Entity\Menu\Interfaces\NodeInterface $parentNode, array $plugins, string $pluginCategory ) Build by category and place all menu entries inside a family

Method Details

__construct() public method

Constructor
public __construct ( Elcodi\Component\Menu\Factory\NodeFactory $menuNodeFactory, array $enabledPlugins )
$menuNodeFactory Elcodi\Component\Menu\Factory\NodeFactory Menu node factory
$enabledPlugins array Enabled Plugins

build() public method

Build the menu
public build ( Elcodi\Component\Menu\Entity\Menu\Interfaces\MenuInterface $menu )
$menu Elcodi\Component\Menu\Entity\Menu\Interfaces\MenuInterface Menu

filterVisiblePlugins() protected method

Return only visible plugins
protected filterVisiblePlugins ( ) : Elcodi\Component\Plugin\Entity\Plugin[]
return Elcodi\Component\Plugin\Entity\Plugin[] Visible plugins

Property Details

$enabledPlugins protected property

Plugins configuration
protected Plugin[],Elcodi\Component\Plugin\Entity $enabledPlugins
return Elcodi\Component\Plugin\Entity\Plugin[]

$menuNodeFactory protected property

Menu node factory
protected NodeFactory,Elcodi\Component\Menu\Factory $menuNodeFactory
return Elcodi\Component\Menu\Factory\NodeFactory