class SurveyCategoryExtension extends Twig_Extension

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

Methods

__construct(SurveyCategoryManager $categoryManager)

Constructor

getFunctions()

{@inheritdoc}

QueryBuilder|null
getTreeCategories(string $locale)

Get tree categories

setTreeCategoriesToCache(string $locale)

Set tree categories to cache

string
getName()

Returns the name of the extension.

mixed
hasRootCategory()

No description

saveCategory(SurveyCategory $category)

Save category

Details

at line 36
__construct(SurveyCategoryManager $categoryManager)

Constructor

Parameters

SurveyCategoryManager $categoryManager

at line 44
getFunctions()

{@inheritdoc}

at line 58
QueryBuilder|null getTreeCategories(string $locale)

Get tree categories

Parameters

string $locale

Return Value

QueryBuilder|null

at line 76
setTreeCategoriesToCache(string $locale)

Set tree categories to cache

Parameters

string $locale

at line 91
string getName()

Returns the name of the extension.

Return Value

string The extension name

at line 99
mixed hasRootCategory()

Return Value

mixed

at line 111
SurveyCategory saveCategory(SurveyCategory $category)

Save category

Parameters

SurveyCategory $category

Return Value

SurveyCategory