示例#1
0
 /**
  * Unsubscribe constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext                      $context
  * @param \ACP3\Core\Helpers\FormToken                                       $formTokenHelper
  * @param \ACP3\Modules\ACP3\Newsletter\Helper\AccountStatus                 $accountStatusHelper
  * @param \ACP3\Modules\ACP3\Newsletter\Validation\UnsubscribeFormValidation $unsubscribeFormValidation
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\FormToken $formTokenHelper, Newsletter\Helper\AccountStatus $accountStatusHelper, Newsletter\Validation\UnsubscribeFormValidation $unsubscribeFormValidation)
 {
     parent::__construct($context);
     $this->formTokenHelper = $formTokenHelper;
     $this->accountStatusHelper = $accountStatusHelper;
     $this->unsubscribeFormValidation = $unsubscribeFormValidation;
 }
示例#2
0
 public function preDispatch()
 {
     parent::preDispatch();
     if ($this->user->isAuthenticated() === false) {
         throw new UnauthorizedAccessException();
     }
 }
示例#3
0
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Date $date
  * @param \ACP3\Modules\ACP3\Files\Model\Repository\FilesRepository $filesRepository
  * @param \ACP3\Modules\ACP3\Files\Cache $filesCache
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Files\Model\Repository\FilesRepository $filesRepository, Files\Cache $filesCache)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->filesRepository = $filesRepository;
     $this->filesCache = $filesCache;
 }
示例#4
0
 /**
  * Result constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext   $context
  * @param \ACP3\Core\Date                                 $date
  * @param \ACP3\Modules\ACP3\Polls\Model\Repository\PollRepository   $pollRepository
  * @param \ACP3\Modules\ACP3\Polls\Model\Repository\AnswerRepository $answerRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Polls\Model\Repository\PollRepository $pollRepository, Polls\Model\Repository\AnswerRepository $answerRepository)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->pollRepository = $pollRepository;
     $this->answerRepository = $answerRepository;
 }
示例#5
0
 /**
  * Index constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext       $context
  * @param \ACP3\Core\Date                                     $date
  * @param \ACP3\Core\Pagination                               $pagination
  * @param \ACP3\Modules\ACP3\Articles\Model\Repository\ArticleRepository $articleRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Core\Pagination $pagination, Articles\Model\Repository\ArticleRepository $articleRepository)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->pagination = $pagination;
     $this->articleRepository = $articleRepository;
 }
示例#6
0
 /**
  * Files constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext          $context
  * @param \ACP3\Core\Date                                        $date
  * @param \ACP3\Modules\ACP3\Files\Model\Repository\FilesRepository         $filesRepository
  * @param \ACP3\Modules\ACP3\Categories\Model\Repository\CategoryRepository $categoryRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, FilesModule\Model\Repository\FilesRepository $filesRepository, Categories\Model\Repository\CategoryRepository $categoryRepository)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->filesRepository = $filesRepository;
     $this->categoryRepository = $categoryRepository;
 }
示例#7
0
文件: Index.php 项目: acp3/cms
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Helpers\Forms $formsHelper
  * @param \ACP3\Modules\ACP3\Search\Helpers $searchHelpers
  * @param \ACP3\Modules\ACP3\Search\Validation\FormValidation $searchValidator
  * @param Search\Utility\SearchAvailabilityRegistrar $availableModulesRegistrar
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\Forms $formsHelper, Search\Helpers $searchHelpers, Search\Validation\FormValidation $searchValidator, Search\Utility\SearchAvailabilityRegistrar $availableModulesRegistrar)
 {
     parent::__construct($context);
     $this->formsHelper = $formsHelper;
     $this->searchHelpers = $searchHelpers;
     $this->searchValidator = $searchValidator;
     $this->availableModulesRegistrar = $availableModulesRegistrar;
 }
示例#8
0
 /**
  * Index constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext                    $context
  * @param \ACP3\Core\Helpers\Forms                                         $formsHelper
  * @param \ACP3\Core\Helpers\FormToken                                     $formTokenHelper
  * @param \ACP3\Modules\ACP3\Newsletter\Helper\Subscribe                   $subscribeHelper
  * @param \ACP3\Modules\ACP3\Newsletter\Validation\SubscribeFormValidation $subscribeFormValidation
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\Forms $formsHelper, Core\Helpers\FormToken $formTokenHelper, Newsletter\Helper\Subscribe $subscribeHelper, Newsletter\Validation\SubscribeFormValidation $subscribeFormValidation)
 {
     parent::__construct($context);
     $this->formsHelper = $formsHelper;
     $this->formTokenHelper = $formTokenHelper;
     $this->subscribeHelper = $subscribeHelper;
     $this->subscribeFormValidation = $subscribeFormValidation;
 }
示例#9
0
 /**
  * @return $this
  * @throws \ACP3\Core\Authentication\Exception\UnauthorizedAccessException
  */
 public function preDispatch()
 {
     if ($this->user->isAuthenticated() === false) {
         throw new Core\Authentication\Exception\UnauthorizedAccessException();
     }
     parent::preDispatch();
     return $this;
 }
示例#10
0
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Helpers\Forms $formsHelper
  * @param \ACP3\Core\Helpers\FormToken $formTokenHelper
  * @param \ACP3\Modules\ACP3\Contact\Validation\FormValidation $formValidation
  * @param Contact\Model\ContactFormModel $contactFormModel
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\Forms $formsHelper, Core\Helpers\FormToken $formTokenHelper, Contact\Validation\FormValidation $formValidation, Contact\Model\ContactFormModel $contactFormModel)
 {
     parent::__construct($context);
     $this->formsHelper = $formsHelper;
     $this->formTokenHelper = $formTokenHelper;
     $this->formValidation = $formValidation;
     $this->contactFormModel = $contactFormModel;
 }
示例#11
0
 /**
  * Details constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext       $context
  * @param \ACP3\Core\Date                                     $date
  * @param \ACP3\Core\Helpers\PageBreaks                       $pageBreaksHelper
  * @param \ACP3\Modules\ACP3\Articles\Model\Repository\ArticleRepository $articleRepository
  * @param \ACP3\Modules\ACP3\Articles\Cache                   $articlesCache
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Core\Helpers\PageBreaks $pageBreaksHelper, Articles\Model\Repository\ArticleRepository $articleRepository, Articles\Cache $articlesCache)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->pageBreaksHelper = $pageBreaksHelper;
     $this->articleRepository = $articleRepository;
     $this->articlesCache = $articlesCache;
 }
示例#12
0
 /**
  * ForgotPwd constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Helpers\FormToken $formTokenHelper
  * @param \ACP3\Core\Helpers\Secure $secureHelper
  * @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
  * @param \ACP3\Modules\ACP3\Users\Validation\AccountForgotPasswordFormValidation $accountForgotPasswordFormValidation
  * @param \ACP3\Core\Helpers\SendEmail $sendEmail
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\FormToken $formTokenHelper, Core\Helpers\Secure $secureHelper, Users\Model\Repository\UserRepository $userRepository, Users\Validation\AccountForgotPasswordFormValidation $accountForgotPasswordFormValidation, Core\Helpers\SendEmail $sendEmail)
 {
     parent::__construct($context);
     $this->formTokenHelper = $formTokenHelper;
     $this->secureHelper = $secureHelper;
     $this->userRepository = $userRepository;
     $this->accountForgotPasswordFormValidation = $accountForgotPasswordFormValidation;
     $this->sendEmail = $sendEmail;
 }
示例#13
0
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param Core\Date $date
  * @param Polls\Validation\VoteValidation $voteValidation
  * @param Polls\Model\VoteModel $pollsModel
  * @param \ACP3\Modules\ACP3\Polls\Model\Repository\PollRepository $pollRepository
  * @param \ACP3\Modules\ACP3\Polls\Model\Repository\AnswerRepository $answerRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Polls\Validation\VoteValidation $voteValidation, Polls\Model\VoteModel $pollsModel, Polls\Model\Repository\PollRepository $pollRepository, Polls\Model\Repository\AnswerRepository $answerRepository)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->voteValidation = $voteValidation;
     $this->pollsModel = $pollsModel;
     $this->pollRepository = $pollRepository;
     $this->answerRepository = $answerRepository;
 }
示例#14
0
 /**
  * Register constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Date $date
  * @param \ACP3\Core\Helpers\FormToken $formTokenHelper
  * @param \ACP3\Core\Helpers\Secure $secureHelper
  * @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
  * @param \ACP3\Modules\ACP3\Users\Validation\RegistrationFormValidation $registrationFormValidation
  * @param \ACP3\Modules\ACP3\Permissions\Helpers $permissionsHelpers
  * @param \ACP3\Core\Helpers\SendEmail $sendEmail
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Date $date, Core\Helpers\FormToken $formTokenHelper, Core\Helpers\Secure $secureHelper, Users\Model\Repository\UserRepository $userRepository, Users\Validation\RegistrationFormValidation $registrationFormValidation, Permissions\Helpers $permissionsHelpers, Core\Helpers\SendEmail $sendEmail)
 {
     parent::__construct($context);
     $this->date = $date;
     $this->formTokenHelper = $formTokenHelper;
     $this->secureHelper = $secureHelper;
     $this->userRepository = $userRepository;
     $this->registrationFormValidation = $registrationFormValidation;
     $this->permissionsHelpers = $permissionsHelpers;
     $this->sendEmail = $sendEmail;
 }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->commentsSettings = $this->config->getSettings(Schema::MODULE_NAME);
     $this->emoticonsActive = $this->commentsSettings['emoticons'] == 1;
 }
示例#16
0
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext            $context
  * @param Core\Pagination                                          $pagination
  * @param \ACP3\Modules\ACP3\Newsletter\Model\Repository\NewsletterRepository $newsletterRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Pagination $pagination, Newsletter\Model\Repository\NewsletterRepository $newsletterRepository)
 {
     parent::__construct($context);
     $this->pagination = $pagination;
     $this->newsletterRepository = $newsletterRepository;
 }
示例#17
0
 /**
  * Index constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Modules\ACP3\Categories\Cache           $categoriesCache
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Categories\Cache $categoriesCache)
 {
     parent::__construct($context);
     $this->categoriesCache = $categoriesCache;
 }
示例#18
0
 /**
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Modules\ACP3\Feeds\View\Renderer\FeedGenerator $feedGenerator
  * @param Feeds\Utility\FeedAvailabilityRegistrar $availableFeedsRegistrar
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Feeds\View\Renderer\FeedGenerator $feedGenerator, Feeds\Utility\FeedAvailabilityRegistrar $availableFeedsRegistrar)
 {
     parent::__construct($context);
     $this->feedGenerator = $feedGenerator;
     $this->availableFeedsRegistrar = $availableFeedsRegistrar;
 }
示例#19
0
 /**
  * Login constructor.
  * @param Core\Controller\Context\FrontendContext $context
  * @param Users\Model\AuthenticationModel $authenticationModel
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Users\Model\AuthenticationModel $authenticationModel)
 {
     parent::__construct($context);
     $this->authenticationModel = $authenticationModel;
 }
示例#20
0
 public function preDispatch()
 {
     parent::preDispatch();
     $this->newsSettings = $this->config->getSettings(Schema::MODULE_NAME);
     $this->commentsActive = $this->newsSettings['comments'] == 1 && $this->acl->hasPermission('frontend/comments') === true;
 }
示例#21
0
 /**
  * Index constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Pagination                         $pagination
  * @param \ACP3\Modules\ACP3\Users\Model\Repository\UserRepository $userRepository
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Pagination $pagination, Users\Model\Repository\UserRepository $userRepository)
 {
     parent::__construct($context);
     $this->pagination = $pagination;
     $this->userRepository = $userRepository;
 }
示例#22
0
 /**
  * Login constructor.
  * @param Core\Controller\Context\FrontendContext $context
  * @param Core\Helpers\Forms $forms
  * @param Users\Model\AuthenticationModel $authenticationModel
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Helpers\Forms $forms, Users\Model\AuthenticationModel $authenticationModel)
 {
     parent::__construct($context);
     $this->authenticationModel = $authenticationModel;
     $this->forms = $forms;
 }
示例#23
0
 /**
  * Image constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext $context
  * @param \ACP3\Core\Session\SessionHandlerInterface    $sessionHandler
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Core\Session\SessionHandlerInterface $sessionHandler)
 {
     parent::__construct($context);
     $this->sessionHandler = $sessionHandler;
 }
示例#24
0
 /**
  * Activate constructor.
  *
  * @param \ACP3\Core\Controller\Context\FrontendContext                          $context
  * @param \ACP3\Modules\ACP3\Newsletter\Helper\AccountStatus                     $accountStatusHelper
  * @param \ACP3\Modules\ACP3\Newsletter\Validation\ActivateAccountFormValidation $activateAccountFormValidation
  */
 public function __construct(Core\Controller\Context\FrontendContext $context, Newsletter\Helper\AccountStatus $accountStatusHelper, Newsletter\Validation\ActivateAccountFormValidation $activateAccountFormValidation)
 {
     parent::__construct($context);
     $this->accountStatusHelper = $accountStatusHelper;
     $this->activateAccountFormValidation = $activateAccountFormValidation;
 }
示例#25
0
 public function preDispatch()
 {
     parent::preDispatch();
     $this->settings = $this->config->getSettings(Schema::MODULE_NAME);
 }