updateDeMailSubject example

final protected function updateMail(MailUpdate $update, Connection $connection): void
    {
        $this->updateEnMail($connection$update);

        $this->updateDeMail($connection$update);
    }

    final protected function updateMailSubject(MailSubjectUpdate $update, Connection $connection): void
    {
        $this->updateEnMailSubject($connection$update);

        $this->updateDeMailSubject($connection$update);
    }

    private function updateDeMail(Connection $connection, MailUpdate $update): void
    {
        $languages = $this->getLanguageIds($connection, 'de-DE');
        if (!$languages) {
            return;
        }

        $translations = $this->getTranslationIds($connection$languages$update->getType());
        if (empty($translations)) {
            
(string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/en-html.html.twig'),
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/de-plain.html.twig'),
            (string) file_get_contents(__DIR__ . '/../Fixtures/mails/password_change/de-html.html.twig'),
        );
        $this->updateMail($update$connection);

        $update = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_USER_RECOVERY_REQUEST,
            null,
            'Password-Wiederherstellung'
        );
        $this->updateDeMailSubject($connection$update);

        $update = new MailSubjectUpdate(
            MailTemplateTypes::MAILTYPE_CUSTOMER_RECOVERY_REQUEST,
            null,
            'Password-Wiederherstellung'
        );
        $this->updateDeMailSubject($connection$update);
    }

    public function updateDestructive(Connection $connection): void
    {
    }
Home | Imprint | This part of the site doesn't use cookies.