PHP Class MetaModels\BackendIntegration\BackendModuleBuilder

显示文件 Open project: metamodels/core Class Usage Examples

Protected Properties

Property Type Description
$backendMenu array The contents of the backend menu to be set.
$container MetaModels\IMetaModelsServiceContainer The service container.
$languageStrings array The language strings for the modules.
$viewCombinations MetaModels\BackendIntegration\ViewCombinations The view combinations.

Public Methods

Method Description
__construct ( MetaModels\IMetaModelsServiceContainer $container, MetaModels\BackendIntegration\ViewCombinations $viewCombinations ) Create a new instance.
export ( ) : void Set the local data into the GLOBALS config.

Protected Methods

Method Description
buildIcon ( string $icon ) : string Build a 16x16 sized representation of the passed icon if it exists or fallback to the default icon otherwise.
calculateCacheKey ( ) : string Calculate the cache key to use.
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Retrieve the event dispatcher.
loadFromCache ( ) : boolean Try to load the combinations from cache.
saveToCache ( ) : boolean Try to load the combinations from cache.

Private Methods

Method Description
addChildTablesToBackendModules ( string[] $parentTables ) : void Inject all meta models into their corresponding parent tables.
addModuleToBackendMenu ( MetaModels\BackendIntegration\InputScreen\IInputScreen $inputScreen ) : void Handle stand alone integration in the backend.
getTableNamesFromInputScreens ( string[] $metaModelNames ) : string[] Retrieve the table names from a list of input screens.
resolve ( ) : void Inject MetaModels in the backend menu.

Method Details

__construct() public method

Create a new instance.
public __construct ( MetaModels\IMetaModelsServiceContainer $container, MetaModels\BackendIntegration\ViewCombinations $viewCombinations )
$container MetaModels\IMetaModelsServiceContainer The service container.
$viewCombinations MetaModels\BackendIntegration\ViewCombinations The view combinations.

buildIcon() protected method

Build a 16x16 sized representation of the passed icon if it exists or fallback to the default icon otherwise.
protected buildIcon ( string $icon ) : string
$icon string The path to the icon (relative to TL_ROOT).
return string The path to the generated icon.

calculateCacheKey() protected method

Calculate the cache key to use.
protected calculateCacheKey ( ) : string
return string

export() public method

Set the local data into the GLOBALS config.
public export ( ) : void
return void

getEventDispatcher() protected method

Retrieve the event dispatcher.
protected getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
return Symfony\Component\EventDispatcher\EventDispatcherInterface

loadFromCache() protected method

Try to load the combinations from cache.
protected loadFromCache ( ) : boolean
return boolean

saveToCache() protected method

Try to load the combinations from cache.
protected saveToCache ( ) : boolean
return boolean

Property Details

$backendMenu protected_oe property

The contents of the backend menu to be set.
protected array $backendMenu
return array

$container protected_oe property

The service container.
protected IMetaModelsServiceContainer,MetaModels $container
return MetaModels\IMetaModelsServiceContainer

$languageStrings protected_oe property

The language strings for the modules.
protected array $languageStrings
return array

$viewCombinations protected_oe property

The view combinations.
protected ViewCombinations,MetaModels\BackendIntegration $viewCombinations
return MetaModels\BackendIntegration\ViewCombinations