Files
esun3d/app/code/Esun/EmailPreview/Block/Adminhtml/Preview.php
T
2026-09-15 10:35:56 +08:00

18 lines
779 B
PHP

<?php
declare(strict_types=1);
namespace Esun\EmailPreview\Block\Adminhtml;
use Esun\EmailPreview\Model\TemplateTypes;
use Magento\Backend\Block\Template;
use Magento\Store\Model\System\Store;
class Preview extends Template
{
public function __construct(Template\Context $context, private readonly Store $systemStore, array $data = []) { parent::__construct($context, $data); }
public function getTypes(): array { return TemplateTypes::TYPES; }
public function getStoreOptions(): array { return $this->systemStore->getStoreValuesForForm(false, true); }
public function getPreviewUrl(): string { return $this->getUrl('esun_email_preview/preview/render'); }
public function getSendUrl(): string { return $this->getUrl('esun_email_preview/preview/send'); }
}