public function getAttribute($name, $default = null) { return $this->requestAttributes->getAttribute($name, $default); }
/** * Set locale to translator. * * @param PreRenderEvent $event */ public function setLocaleOnPreviewPreRender(PreRenderEvent $event) { $this->translator->setLocale($event->getAttribute('locale')); }