99 private $filterFactory;
140 \
Magento\Framework\UrlInterface $urlModel,
143 \
Magento\Framework\Serialize\Serializer\Json $serializer =
null 145 $this->filterFactory = $filterFactory;
147 ->get(\
Magento\Framework\Serialize\Serializer\Json::class);
182 return $this->getTemplateId();
193 return $this->setTemplateId(
$value);
203 return $this->getSenderName() && $this->getSenderEmail() && $this->getTemplateSubject();
243 $variables[
'this'] = $this;
251 }
catch (\Exception $e) {
253 throw new \Magento\Framework\Exception\MailException(
__($e->getMessage()), $e);
256 return $processedResult;
268 $this->_bcc[] = $bcc;
281 $this->_returnPath =
$email;
307 if ($variablesString && is_string($variablesString)) {
308 $variablesString = str_replace(
"\n",
'', $variablesString);
309 $variables = $this->serializer->unserialize($variablesString);
326 $optionArray[] = [
'value' =>
'{{' .
$value .
'}}',
'label' =>
__(
'%1',
$label)];
329 $optionArray = [
'label' =>
__(
'Template Variables'),
'value' => $optionArray];
343 $code = $this->getTemplateCode();
345 throw new \Magento\Framework\Exception\MailException(
__(
'Please enter a template name.'));
348 throw new \Magento\Framework\Exception\MailException(
__(
'Duplicate Of Template Name'));
350 parent::beforeSave();
372 if (!$this->
getId()) {
373 throw new \Magento\Framework\Exception\MailException(
378 $this->setUseAbsoluteLinks(
true);
381 if ($isDesignApplied) {
405 $this->_vars = $vars;
425 return $this->filterFactory;
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\View\DesignInterface $design, \Magento\Framework\Registry $registry, \Magento\Store\Model\App\Emulation $appEmulation, StoreManagerInterface $storeManager, \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\Filesystem $filesystem, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Email\Model\Template\Config $emailConfig, \Magento\Email\Model\TemplateFactory $templateFactory, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Framework\UrlInterface $urlModel, \Magento\Email\Model\Template\FilterFactory $filterFactory, array $data=[], \Magento\Framework\Serialize\Serializer\Json $serializer=null)
getData($key='', $index=null)
const XML_PATH_SYSTEM_SMTP_DISABLE
load($modelId, $field=null)
getProcessedTemplateSubject(array $variables)
setDesignConfig(array $config)
getProcessedTemplate(array $variables=[])
const XML_PATH_SENDING_SET_RETURN_PATH
getVariablesOptionArray($withGroup=false)
setOptions(array $options)
const XML_PATH_SENDING_RETURN_PATH_EMAIL
_parseVariablesString($variablesString)