ModuleRegistry

final class \TYPO3\CMS\Backend\Module\ModuleRegistry

Table of Contents

Methods

__construct()  : mixed
getModule()  : ModuleInterface
getModuleAliases()  : array
getModules()  : ModuleInterface[]
hasModule()  : bool
registerRoutesForModules()  : void
Needs to be called when the router is set up, AFTER all modules are loaded.
applyHierarchy()  : ModuleInterface[]
Applies sorting (based on the "position" configuration) to all registered modules and resolves the hierarchy (creating relations by attaching modules to the $parentModule and $subModules properties).
applySorting()  : ModuleInterface[]
Ensures that modules within one level of hierarchy are ordered properly the way they were given respecting their "top", "bottom", "before" or "after" definition.
flattenModules()  : array
Create a flat modules array (looping through each level by calling "getSubmodules()" on the parent)
populateAliasMapping()  : void
populateOrderingsForDependencies()  : array
Given module identifiers are added based on their module position information to the $alreadyOrderedModuleIdentifiers array (if not already present). In case the modules to be added have dependencies to other modules and those modules exist, corresponding modules are added to $alreadyOrderedModuleIdentifiers on the correct position as well.

Methods

getModuleAliases()

public getModuleAliases() : array

Return values

array

hasModule()

public hasModule(string $identifier) : bool

Parameters

$identifier : string

Return values

bool

registerRoutesForModules()

Needs to be called when the router is set up, AFTER all modules are loaded.

public registerRoutesForModules(Router $router) : void

Parameters

$router : Router

applyHierarchy()

Applies sorting (based on the "position" configuration) to all registered modules and resolves the hierarchy (creating relations by attaching modules to the $parentModule and $subModules properties).

protected applyHierarchy(ModuleInterface[] $modules) : ModuleInterface[]

Parameters

$modules : ModuleInterface[]

Return values

ModuleInterface[]

flattenModules()

Create a flat modules array (looping through each level by calling "getSubmodules()" on the parent)

protected flattenModules(array $modules[, mixed $flatModules = [] ]) : array

Parameters

$modules : array
$flatModules : mixed = []

Return values

array

populateAliasMapping()

protected populateAliasMapping() : void

populateOrderingsForDependencies()

Given module identifiers are added based on their module position information to the $alreadyOrderedModuleIdentifiers array (if not already present). In case the modules to be added have dependencies to other modules and those modules exist, corresponding modules are added to $alreadyOrderedModuleIdentifiers on the correct position as well.

protected populateOrderingsForDependencies(array $moduleIdentifiersToBeAdded, array $modulePositionInformation[, array $alreadyOrderedModuleIdentifiers = [] ]) : array

Parameters

$moduleIdentifiersToBeAdded : array
$modulePositionInformation : array
$alreadyOrderedModuleIdentifiers : array = []

Return values

array
On this page