jsTranslationConfig = $jsTranslationConfig; $this->deployStaticFile = $deployStaticFile; $this->state = $state; $this->logger = $logger; } /** * @param string $area * @param string $theme * @param string $locale * @return void */ public function deploy($area, $theme, $locale) { try { $this->state->emulateAreaCode($area, function () use ($area, $theme, $locale) { $this->deployStaticFile->deployFile( $this->jsTranslationConfig->getDictionaryFileName(), [ 'fileName' => $this->jsTranslationConfig->getDictionaryFileName(), 'area' => $area, 'theme' => $theme, 'locale' => $locale ] ); }); } catch (\Exception $e) { $this->logger->error($e->getMessage()); } } }