/** * @param \ACP3\Core\Controller\Context\AdminContext $context * @param \ACP3\Core\Date $date * @param \ACP3\Core\Helpers\Forms $formsHelper * @param \ACP3\Core\Helpers\FormToken $formTokenHelper * @param \ACP3\Modules\ACP3\Polls\Model\Repository\PollRepository $pollRepository * @param Polls\Model\PollsModel $pollsModel * @param \ACP3\Modules\ACP3\Polls\Model\Repository\AnswerRepository $answerRepository * @param \ACP3\Modules\ACP3\Polls\Validation\AdminFormValidation $pollsValidator */ public function __construct(Core\Controller\Context\AdminContext $context, Core\Date $date, Core\Helpers\Forms $formsHelper, Core\Helpers\FormToken $formTokenHelper, Polls\Model\Repository\PollRepository $pollRepository, Polls\Model\PollsModel $pollsModel, Polls\Model\Repository\AnswerRepository $answerRepository, Polls\Validation\AdminFormValidation $pollsValidator) { parent::__construct($context, $formsHelper, $answerRepository); $this->date = $date; $this->formTokenHelper = $formTokenHelper; $this->pollRepository = $pollRepository; $this->pollsModel = $pollsModel; $this->pollsValidator = $pollsValidator; }
/** * @inheritdoc */ protected function fetchOptions($useMultipleChoice) { $reset = ['1' => $this->translator->t('polls', 'reset_votes')]; return array_merge(parent::fetchOptions($useMultipleChoice), $this->formsHelper->checkboxGenerator('reset', $reset, '0')); }