/** * Get the translated layout of mail. * * @param MailInterface $mail The mail * * @return LayoutInterface|null */ protected function getTranslatedLayout(MailInterface $mail) { $layout = $mail->getLayout(); if (null !== $layout) { $layout = TranslationUtil::translateLayout($layout, $this->getLocale(), $this->translator); } return $layout; }