36 $this->
_init(
'email_template',
'template_id');
52 'template_code = :template_code' 54 $bind = [
'template_code' =>
$template->getTemplateCode()];
58 $select->where(
'template_id != :template_id');
78 $object->setTemplateType((
int)$object->getTemplateType());
79 return parent::_beforeSave($object);
95 $pathAlias =
'path_' . $pathsCounter;
96 $orWhere[] =
'path = :' . $pathAlias;
97 $bind[$pathAlias] =
$path;
102 $this->
getTable(
'core_config_data'),
103 [
'scope',
'scope_id',
'path']
105 'value LIKE :template_id' 107 join(
' OR ', $orWhere)
_init($mainTable, $idFieldName)
_beforeSave(AbstractModel $object)
__construct(\Magento\Framework\Model\ResourceModel\Db\Context $context, $connectionName=null)
getSystemConfigByPathsAndTemplateId($paths, $templateId)
checkCodeUsage(\Magento\Email\Model\Template $template)