class DeclarationCategoryExtension extends Twig_Extension

Class DeclarationCategoryExtension is injected as twig.extension.dec.category service. DeclarationCategoryExtension handles the logic and provides necessary data for managed entity in twig.

Properties

protected DeclarationManager $declarationManager
protected DeclarationCategoryManager $categoryManager

Methods

__construct(DeclarationCategoryManager $categoryManager, DeclarationManager $declarationManager)

Constructor

getFunctions()

{@inheritdoc}

array|string
getTreeCategories(string $locale)

Retrieve declaration category tree from cache for provided locale

setTreeCategoriesToCache(string $locale)

Set declaration category tree to cache for provided locale

mixed
getEntitiesForBlockElementsExtension(array $ids)

No description

mixed
getEntitiesForBlockElementsCatExtension(array $ids)

No description

string
getName()

Returns the name of the extension.

Details

at line 42
__construct(DeclarationCategoryManager $categoryManager, DeclarationManager $declarationManager)

Constructor

Parameters

DeclarationCategoryManager $categoryManager
DeclarationManager $declarationManager

at line 51
getFunctions()

{@inheritdoc}

at line 67
array|string getTreeCategories(string $locale)

Retrieve declaration category tree from cache for provided locale

Parameters

string $locale

Return Value

array|string

at line 83
setTreeCategoriesToCache(string $locale)

Set declaration category tree to cache for provided locale

Parameters

string $locale

at line 98
mixed getEntitiesForBlockElementsExtension(array $ids)

Parameters

array $ids

Return Value

mixed

at line 108
mixed getEntitiesForBlockElementsCatExtension(array $ids)

Parameters

array $ids

Return Value

mixed

at line 118
string getName()

Returns the name of the extension.

Return Value

string The extension name