Files
piratepoet/templates/Class.php.tpl
2022-01-18 15:30:22 +01:00

34 lines
808 B
Smarty

<?php
namespace MailPoet\Config\PopulatorData\Templates;
class {{class_name}} {
private $template_image_url;
private $social_icon_url;
function __construct($assets_url) {
$this->template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/{{dir_name}}';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
function get() {
return array(
'name' => __("{{template_name}}", 'mailpoet'),
'categories' => json_encode(array('{{category}}', 'all')),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
);
}
private function getThumbnail() {
return $this->template_image_url . '/thumbnail.jpg';
}
private function getBody() {
return {{body}};
}
}