You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
715 B
24 lines
715 B
<?php
|
|
|
|
class NewHtmlTemplate extends MigrationTask {
|
|
var $description = "Adding new super-awesome HTML templates";
|
|
|
|
function run($runtime) {
|
|
$errors = array();
|
|
|
|
$i18n = new Internationalization('en_US');
|
|
$tpls = $i18n->getTemplate('email_template_group.yaml')->getData();
|
|
foreach ($tpls as $t) {
|
|
// If the email template group specifies an id attribute, remove
|
|
// it for upgrade because we cannot assume that the id slot is
|
|
// available
|
|
unset($t['id']);
|
|
EmailTemplateGroup::create($t, $errors);
|
|
}
|
|
|
|
// NOTE: Core files import moved to 934954de-f1ccd3bb.task.php
|
|
}
|
|
}
|
|
return 'NewHtmlTemplate';
|
|
|
|
?>
|