Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | DEFAULT_DESIGN_AREA = 'frontend' |
const | DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png' |
const | XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo' |
const | XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt' |
const | XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width' |
const | XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height' |
![]() | |
const | TYPE_TEXT = 1 |
const | TYPE_HTML = 2 |
Protected Member Functions | |
getTemplateInstance () | |
getLogoUrl ($store) | |
getLogoAlt ($store) | |
addEmailVariables ($variables, $storeId) | |
applyDesignConfig () | |
cancelDesignConfig () | |
getFilterFactory () | |
![]() | |
_construct () | |
_init ($resourceModel) | |
_setResourceModel ($resourceName, $collectionName=null) | |
_getResource () | |
_getEventData () | |
_beforeLoad ($modelId, $field=null) | |
_afterLoad () | |
_hasModelChanged () | |
_getValidatorBeforeSave () | |
_createValidatorBeforeSave () | |
_getValidationRulesBeforeSave () | |
_clearReferences () | |
_clearData () | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
Protected Attributes | |
$templateFactory = null | |
$design = null | |
$appEmulation | |
$storeManager | |
$assetRepo | |
$filesystem | |
$scopeConfig | |
$emailConfig | |
$filterManager | |
![]() | |
$_eventPrefix = 'core_abstract' | |
$_eventObject = 'object' | |
$_idFieldName = 'id' | |
$_hasDataChanges = false | |
$_origData | |
$_isDeleted = false | |
$_resource | |
$_resourceCollection | |
$_resourceName | |
$_collectionName | |
$_cacheTag = false | |
$_dataSaveAllowed = true | |
$_isObjectNew = null | |
$_validatorBeforeSave = null | |
$_eventManager | |
$_cacheManager | |
$_registry | |
$_logger | |
$_appState | |
$_actionValidator | |
$storedData = [] | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
static | $_underscoreCache = [] |
__construct | ( | \Magento\Framework\Model\Context | $context, |
\Magento\Framework\View\DesignInterface | $design, | ||
\Magento\Framework\Registry | $registry, | ||
\Magento\Store\Model\App\Emulation | $appEmulation, | ||
\Magento\Store\Model\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, | ||
array | $data = [] |
||
) |
\Magento\Framework\Model\Context | $context | |
\Magento\Framework\View\DesignInterface | $design | |
\Magento\Framework\Registry | $registry | |
\Magento\Store\Model\App\Emulation | $appEmulation | |
\Magento\Store\Model\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 | |
array | $data | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 183 of file AbstractTemplate.php.
|
protected |
Add variables that are used by transactional and newsletter emails
array | $variables | |
null | string | bool | int | Store | $storeId |
@SuppressWarnings(PHPMD.CyclomaticComplexity) @SuppressWarnings(PHPMD.NPathComplexity)
Definition at line 436 of file AbstractTemplate.php.
|
protected |
Apply design config so that emails are processed within the context of the appropriate area/store/theme. Can be called multiple times without issue.
Definition at line 497 of file AbstractTemplate.php.
|
protected |
Revert design settings to previous
Definition at line 522 of file AbstractTemplate.php.
emulateDesign | ( | $storeId, | |
$area = self::DEFAULT_DESIGN_AREA |
|||
) |
Save current design config and replace with design config from specified store Event is not dispatched.
null | bool | int | string | $storeId | |
string | $area |
Definition at line 674 of file AbstractTemplate.php.
getDefaultEmailLogo | ( | ) |
Get default email logo image
Definition at line 371 of file AbstractTemplate.php.
getDesignConfig | ( | ) |
Get design configuration data
Definition at line 582 of file AbstractTemplate.php.
getDesignParams | ( | ) |
Returns the design params for the template being processed
Definition at line 565 of file AbstractTemplate.php.
|
abstractprotected |
Getter for filter factory that is specific to the type of template being processed
|
protected |
Return logo alt for emails
Store | int | string | $store |
Definition at line 412 of file AbstractTemplate.php.
|
protected |
Return logo URL for emails. Take logo from theme if custom logo is undefined
Store | int | string | $store |
Definition at line 386 of file AbstractTemplate.php.
getProcessedTemplate | ( | array | $variables = [] | ) |
Process email template code
array | $variables |
Definition at line 328 of file AbstractTemplate.php.
getTemplateContent | ( | $configPath, | |
array | $variables | ||
) |
Get contents of the included template for template directive
string | $configPath | |
array | $variables |
Definition at line 220 of file AbstractTemplate.php.
getTemplateFilter | ( | ) |
Get filter object for template processing
Definition at line 655 of file AbstractTemplate.php.
|
protected |
Return a new instance of the template object. Used by the template directive.
Definition at line 249 of file AbstractTemplate.php.
|
abstract |
getUrl | ( | Store | $store, |
$route = '' , |
|||
$params = [] |
|||
) |
Generate URL for the specified store.
Store | $store | |
string | $route | |
array | $params |
Definition at line 736 of file AbstractTemplate.php.
isChildTemplate | ( | ) |
Check whether template is child of another template
Definition at line 621 of file AbstractTemplate.php.
isPlain | ( | ) |
Return true if template type eq text
Implements TemplateTypesInterface.
Definition at line 709 of file AbstractTemplate.php.
loadByConfigPath | ( | $configPath | ) |
Load template from database when overridden in configuration or load default from relevant file system location.
string | $configPath |
Definition at line 260 of file AbstractTemplate.php.
loadDefault | ( | $templateId | ) |
Load default email template
string | $templateId |
trim copyright message
Definition at line 279 of file AbstractTemplate.php.
revertDesign | ( | ) |
Revert to last design config, used before emulation
Definition at line 695 of file AbstractTemplate.php.
setDesignConfig | ( | array | $config | ) |
Initialize design information for template processing
array | $config |
LocalizedException |
Definition at line 605 of file AbstractTemplate.php.
setForcedArea | ( | $templateId | ) |
Store the area associated with a template so that it will be returned by getDesignConfig and getDesignParams
string | $templateId |
Definition at line 535 of file AbstractTemplate.php.
setForcedTheme | ( | $templateId, | |
$theme | |||
) |
Manually set a theme that will be used by getParams
Used to force the loading of an email template from a specific theme
string | $templateId | |
string | $theme |
Definition at line 553 of file AbstractTemplate.php.
setIsChildTemplate | ( | $isChildTemplate | ) |
Set whether template is child of another template
bool | $isChildTemplate |
Definition at line 632 of file AbstractTemplate.php.
setTemplateFilter | ( | Template\Filter | $filter | ) |
Declare template processing filter
\Magento\Email\Model\Template\Filter | $filter |
Definition at line 644 of file AbstractTemplate.php.
|
protected |
Definition at line 125 of file AbstractTemplate.php.
|
protected |
Definition at line 137 of file AbstractTemplate.php.
|
protected |
Definition at line 120 of file AbstractTemplate.php.
|
protected |
Definition at line 154 of file AbstractTemplate.php.
|
protected |
Definition at line 142 of file AbstractTemplate.php.
|
protected |
Definition at line 159 of file AbstractTemplate.php.
|
protected |
Definition at line 149 of file AbstractTemplate.php.
|
protected |
Definition at line 130 of file AbstractTemplate.php.
|
protected |
Definition at line 113 of file AbstractTemplate.php.
const DEFAULT_DESIGN_AREA = 'frontend' |
Default design area for emulation
Definition at line 32 of file AbstractTemplate.php.
const DEFAULT_LOGO_FILE_ID = 'Magento_Email::logo_email.png' |
Default path to email logo
Definition at line 37 of file AbstractTemplate.php.
const XML_PATH_DESIGN_EMAIL_LOGO = 'design/email/logo' |
Email logo url
Definition at line 42 of file AbstractTemplate.php.
const XML_PATH_DESIGN_EMAIL_LOGO_ALT = 'design/email/logo_alt' |
Email logo alt text
Definition at line 47 of file AbstractTemplate.php.
const XML_PATH_DESIGN_EMAIL_LOGO_HEIGHT = 'design/email/logo_height' |
Email logo height
Definition at line 57 of file AbstractTemplate.php.
const XML_PATH_DESIGN_EMAIL_LOGO_WIDTH = 'design/email/logo_width' |
Email logo width
Definition at line 52 of file AbstractTemplate.php.