class SurveyExtension extends Twig_Extension

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

Methods

__construct(SurveyQuestionAggregationManager $questionAggregationManager, UserManager $userManager, SurveyManager $surveyManager)

Constructor

getFunctions()

{@inheritdoc}

array
getCheckoutSurvey(int $surveyId, int $numOfOrders, User $user, string $locale)

Get checkout survey by id and number of orders for user and specific locale

array
getSurveyByPk(array $ids)

Get survey by primary key

Details

at line 44
__construct(SurveyQuestionAggregationManager $questionAggregationManager, UserManager $userManager, SurveyManager $surveyManager)

Constructor

Parameters

SurveyQuestionAggregationManager $questionAggregationManager
UserManager $userManager
SurveyManager $surveyManager

at line 54
getFunctions()

{@inheritdoc}

at line 74
array getCheckoutSurvey(int $surveyId, int $numOfOrders, User $user, string $locale)

Get checkout survey by id and number of orders for user and specific locale

Parameters

int $surveyId
int $numOfOrders
User $user
string $locale

Return Value

array

Exceptions

NonUniqueResultException

at line 88
array getSurveyByPk(array $ids)

Get survey by primary key

Parameters

array $ids

Return Value

array