Exemplo n.º 1
0
 /**
  * @param EntityManager $entityManager
  * @param SessionInterface $session
  * @param AuthorizationChecker $securityAuthorizationChecker
  * @param ContextService $contextService
  * @param ContextManager $contextManager
  */
 public function __construct(EntityManager $entityManager, SessionInterface $session, AuthorizationChecker $securityAuthorizationChecker, ContextService $contextService, ContextManager $contextManager)
 {
     $this->entityManager = $entityManager;
     $this->session = $session;
     $this->securityAuthorizationChecker = $securityAuthorizationChecker;
     $this->contextService = $contextService;
     $this->contextManager = $contextManager;
     $this->contexts = $contextService->getContexts();
 }
Exemplo n.º 2
0
 /**
  * @param TranslatableListener                                 $translationListener
  * @param Kernel                                               $kernel
  * @param \Bigfoot\Bundle\ContextBundle\Service\ContextService $context
  *
  * @internal param array $allowedLocales
  */
 public function __construct(TranslatableListener $translationListener, Kernel $kernel, ContextService $context)
 {
     $contexts = $context->getContexts();
     $this->translationListener = $translationListener;
     $this->kernel = $kernel;
     $this->defaultBackLocale = $contexts['language_back']['default_value'];
     $this->context = $context;
     $this->allowedLocales = array_keys($context->getValues('language_back'));
 }