$mailTemplateTypeId = Uuid::
fromHexToBytes($contactFormEmailTemplate['id'
]);
$connection->
insert( 'mail_template_type',
[ 'id' =>
$mailTemplateTypeId,
'technical_name' => MailTemplateTypes::MAILTYPE_CONTACT_FORM,
'available_entities' =>
$contactFormEmailTemplate['availableEntities'
],
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
] );
$defaultLangId =
$this->
getLanguageIdByLocale($connection, 'en-GB'
);
$deLangId =
$this->
getLanguageIdByLocale($connection, 'de-DE'
);
if ($defaultLangId !==
$deLangId) { $connection->
insert( 'mail_template_type_translation',
[ 'mail_template_type_id' =>
$mailTemplateTypeId,
'name' =>
$contactFormEmailTemplate['name'
],
'language_id' =>
$defaultLangId,
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
] );