/** * {@inheritdoc} */ protected function createMailTranslation(MailInterface $mail, array $config) { /* @var $translation TwigMailTranslation */ $translation = parent::createMailTranslation($mail, $config); $translation->setFile(ConfigUtil::getValue($config, 'file')); return $translation; }
/** * {@inheritdoc} */ public function load($name, $type = MailTypes::TYPE_ALL) { if (is_array($this->resources)) { foreach ($this->resources as $resource) { $config = ConfigUtil::formatConfig($resource); $filename = $this->kernel->locateResource($resource); $loadedConfig = Yaml::parse(file_get_contents($filename)); $this->addMail($this->createMail(array_replace($loadedConfig, $config))); } $this->resources = null; } return parent::load($name, $type); }