43 \
Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
48 $this->_wysiwygConfig = $wysiwygConfig;
49 parent::__construct($context,
$data);
59 return $this->_coreRegistry->registry(
'_current_template');
74 'label' =>
__(
'Back'),
75 'onclick' =>
"window.location.href = '" . $this->
getUrl(
'*/*') .
"'",
76 'class' =>
'action-back' 84 'label' =>
__(
'Reset'),
85 'onclick' =>
'window.location.href = window.location.href',
95 'label' =>
__(
'Convert to Plain Text'),
97 'role' =>
'template-strip',
99 'id' =>
'convert_button',
108 'label' =>
__(
'Return HTML Version'),
109 'data_attribute' => [
110 'role' =>
'template-unstrip',
112 'id' =>
'convert_button_back',
113 'style' =>
'display:none',
123 'label' =>
__(
'Preview Template'),
124 'data_attribute' => [
125 'role' =>
'template-preview',
136 'label' =>
__(
'Delete Template'),
137 'data_attribute' => [
138 'role' =>
'template-delete',
148 'label' =>
__(
'Save As'),
149 'data_attribute' => [
150 'role' =>
'template-save-as',
161 'label' =>
__(
'Save Template'),
162 'data_attribute' => [
163 'role' =>
'template-save',
165 'class' =>
'save primary' 169 return parent::_prepareLayout();
194 return __(
'Edit Newsletter Template');
197 return __(
'New Newsletter Template');
219 return addcslashes($this->
getModel()->getTemplateCode(),
"\"\r\n\\");
229 return $this->
getUrl(
'*/*/save');
239 return $this->
getUrl(
'*/*/preview', [
'id' => $this->
getRequest()->getParam(
'id')]);
249 return $this->
getModel()->isPlain();
260 return $this->
getModel()->getTemplateType();
262 return TemplateTypesInterface::TYPE_HTML;
272 return $this->
getUrl(
'*/*/delete', [
'id' => $this->
getRequest()->getParam(
'id')]);
282 return $this->
getRequest()->getParam(
'_save_as_flag') ?
'1' :
'';
292 return $this->_storeManager->isSingleStoreMode();
302 return $this->_storeManager->getStore(
true)->getId();
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig, \Magento\Framework\Registry $registry, array $data=[])
getUrl($route='', $params=[])