/**
  * @param GetResponseEvent $event
  */
 public function onLateKernelRequest(GetResponseEvent $event)
 {
     if (HttpKernelInterface::MASTER_REQUEST !== $event->getRequestType() or !in_array($this->kernel->getEnvironment(), array('admin', 'admin_dev'))) {
         return;
     }
     $this->translationListener->setTranslatableLocale($this->context->getDefaultFrontLocale());
 }
 /**
  * @param array                        $localeList
  * @param RegistryInterface            $doctrine
  * @param Reader                       $annotationReader
  * @param BigfootTranslationRepository $translationRepository
  * @param string                       $defaultLocale
  * @param ContextService               $context
  */
 public function __construct($localeList, RegistryInterface $doctrine, Reader $annotationReader, BigfootTranslationRepository $translationRepository, $defaultLocale, ContextService $context)
 {
     $this->localeList = $localeList;
     $this->doctrine = $doctrine;
     $this->annotationReader = $annotationReader;
     $this->translationRepository = $translationRepository;
     $this->defaultLocale = $defaultLocale;
     $this->currentLocale = $context->getDefaultFrontLocale();
 }