class MenuHelper (View source)

A helper class for menu generation in backend controllers / view helpers

Properties

protected array|null $moduleListFirstLevelCache
protected SiteRepository $siteRepository
protected PrivilegeManagerInterface $privilegeManager
protected array $settings
protected IconNameMappingService $iconMapper
protected WorkspaceRepository $workspaceRepository
protected NodeDataRepository $nodeDataRepository
protected NodeFactory $nodeFactory

Methods

void
injectSettings(array $settings)

No description

array
buildSiteList(ControllerContext $controllerContext)

Build a list of sites

array
buildModuleList(ControllerContext $controllerContext)

No description

bool
isModuleEnabled(string $modulePath)

Checks whether a module is enabled or disabled in the configuration

array
collectModuleData(ControllerContext $controllerContext, string $module, array $moduleConfiguration, string $modulePath)

No description

Details

void injectSettings(array $settings)

No description

Parameters

array $settings

Return Value

void

array buildSiteList(ControllerContext $controllerContext)

Build a list of sites

Parameters

ControllerContext $controllerContext

Return Value

array

Exceptions

Exception

array buildModuleList(ControllerContext $controllerContext)

No description

Parameters

ControllerContext $controllerContext

Return Value

array

Exceptions

MissingActionNameException

bool isModuleEnabled(string $modulePath)

Checks whether a module is enabled or disabled in the configuration

Parameters

string $modulePath

name of the module including parent modules ("mainModule/subModule/subSubModule")

Return Value

bool

true if module is enabled (default), false otherwise

protected array collectModuleData(ControllerContext $controllerContext, string $module, array $moduleConfiguration, string $modulePath)

No description

Parameters

ControllerContext $controllerContext
string $module
array $moduleConfiguration
string $modulePath

Return Value

array

Exceptions

Exception
MissingActionNameException