Mage_Widget_Model_Template_Filter
extends Mage_Cms_Model_Template_Filter
in package
Maho
Tags
Table of Contents
Constants
- CONSTRUCTION_DEPEND_PATTERN : mixed = '/{{depend\s*(.*?)}}(.*?){{\/depend\s*}}/si'
- Cunstruction logic regular expression
- CONSTRUCTION_IF_PATTERN : mixed = '/{{if\s*(.*?)}}(.*?)({{else}}(.*?))?{{\/if\s*}...
- CONSTRUCTION_PATTERN : mixed = '/{{([a-z]{0,10})(.*?)}}/si'
- Cunstruction regular expression
Properties
- $_includeProcessor : array<string|int, mixed>|string|null
- Include processor
- $_inlineCssFile : bool|string
- $_modifiers : array<string|int, mixed>
- Modifier Callbacks
- $_permissionBlock : Mage_Admin_Model_Block
- $_permissionVariable : Mage_Admin_Model_Variable
- $_plainTemplateMode : mixed
- $_storeId : mixed
- $_templateProcessor : array<string|int, mixed>|string|null
- Template processor
- $_templateVars : array<string|int, mixed>
- Assigned template variables
- $_useAbsoluteLinks : bool
- Use absolute links flag
- $_useSessionInUrl : bool
- Whether to allow SID in store directive: AUTO
Methods
- __construct() : mixed
- Setup callbacks for filters
- blockDirective() : string
- Retrieve Block html directive
- configDirective() : string
- Store config directive
- customvarDirective() : string
- Custom Variable directive
- dependDirective() : mixed
- filter() : string
- Filter the string as template.
- getIncludeProcessor() : array<string|int, mixed>|null
- Sets the proccessor of includes.
- getInlineCssFile() : bool|string
- Get filename of CSS file to inline
- getPlainTemplateMode() : bool
- Getter
- getStoreId() : int
- Getter if $_storeId is null return Design store id
- getTemplateProcessor() : array<string|int, mixed>|null
- Sets the proccessor of templates.
- htmlescapeDirective() : string
- Directive for converting special characters to HTML entities Supported options: allowed_tags - Comma separated html tags that have not to be converted
- ifDirective() : mixed
- includeDirective() : mixed
- inlinecssDirective() : string
- This directive will allow CSS files to be applied inline to the HTML in the email template.
- layoutDirective() : string
- Retrieve layout html directive
- mediaDirective() : string
- Retrieve media file URL directive
- modifierEscape() : string
- Escape specified string
- protocolDirective() : string
- HTTP Protocol directive
- setIncludeProcessor() : mixed
- Sets the proccessor of includes.
- setPlainTemplateMode() : $this
- Setter
- setStoreId() : $this
- Setter
- setTemplateProcessor() : mixed
- Sets the proccessor of templates. Templates are directives that include email templates based on system configuration path.
- setUseAbsoluteLinks() : $this
- Set use absolute links flag
- setUseSessionInUrl() : $this
- Setter whether SID is allowed in store directive
- setVariables() : mixed
- Sets template variables that's can be called through {var ...} statement
- skinDirective() : string
- Retrieve Skin URL directive
- storeDirective() : string
- Retrieve store URL directive Support url and direct_url properties
- templateDirective() : mixed|string
- This directive allows email templates to be included inside other email templates using the following syntax: {{template config_path="<PATH>"}}, where <PATH> equals the XPATH to the system configuration value that contains the value of the email template. For example "sales_email/order/template", which is stored in the Mage_Sales_Model_Order::sales_email/order/template. This directive is useful to include things like a global header/footer.
- varDirective() : string
- Var directive with modifiers support
- widgetDirective() : string
- Generate widget
- _amplifyModifiers() : string
- Apply modifiers one by one, with specified params
- _getBlockParameters() : array<string|int, mixed>
- Retrieve block parameters
- _getIncludeParameters() : array<string|int, mixed>
- Return associative array of include construction.
- _getVariable() : string
- Return variable value for var construction
- _setInlineCssFile() : $this
- Set filename of CSS file to inline
- getEmailPathValidator() : Mage_Adminhtml_Model_Email_PathValidator
- Retrieve model object
Constants
CONSTRUCTION_DEPEND_PATTERN
Cunstruction logic regular expression
public
mixed
CONSTRUCTION_DEPEND_PATTERN
= '/{{depend\s*(.*?)}}(.*?){{\/depend\s*}}/si'
CONSTRUCTION_IF_PATTERN
public
mixed
CONSTRUCTION_IF_PATTERN
= '/{{if\s*(.*?)}}(.*?)({{else}}(.*?))?{{\/if\s*}}/si'
CONSTRUCTION_PATTERN
Cunstruction regular expression
public
mixed
CONSTRUCTION_PATTERN
= '/{{([a-z]{0,10})(.*?)}}/si'
Properties
$_includeProcessor
Include processor
protected
array<string|int, mixed>|string|null
$_includeProcessor
= null
$_inlineCssFile
protected
bool|string
$_inlineCssFile
= \false
$_modifiers
Modifier Callbacks
protected
array<string|int, mixed>
$_modifiers
= ['nl2br' => '']
$_permissionBlock
protected
Mage_Admin_Model_Block
$_permissionBlock
$_permissionVariable
protected
Mage_Admin_Model_Variable
$_permissionVariable
$_plainTemplateMode
protected
mixed
$_plainTemplateMode
= \false
$_storeId
protected
mixed
$_storeId
= \null
$_templateProcessor
Template processor
protected
array<string|int, mixed>|string|null
$_templateProcessor
= null
$_templateVars
Assigned template variables
protected
array<string|int, mixed>
$_templateVars
= []
$_useAbsoluteLinks
Use absolute links flag
protected
bool
$_useAbsoluteLinks
= \false
$_useSessionInUrl
Whether to allow SID in store directive: AUTO
protected
bool
$_useSessionInUrl
= \null
Methods
__construct()
Setup callbacks for filters
public
__construct() : mixed
blockDirective()
Retrieve Block html directive
public
blockDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Return values
stringconfigDirective()
Store config directive
public
configDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringcustomvarDirective()
Custom Variable directive
public
customvarDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringdependDirective()
public
dependDirective(mixed $construction) : mixed
Parameters
- $construction : mixed
filter()
Filter the string as template.
public
filter(string $value) : string
Rewritten for logging exceptions
Parameters
- $value : string
Attributes
- #[Override]
Return values
stringgetIncludeProcessor()
Sets the proccessor of includes.
public
getIncludeProcessor() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetInlineCssFile()
Get filename of CSS file to inline
public
getInlineCssFile() : bool|string
Return values
bool|stringgetPlainTemplateMode()
Getter
public
getPlainTemplateMode() : bool
Return values
boolgetStoreId()
Getter if $_storeId is null return Design store id
public
getStoreId() : int
Tags
Return values
intgetTemplateProcessor()
Sets the proccessor of templates.
public
getTemplateProcessor() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullhtmlescapeDirective()
Directive for converting special characters to HTML entities Supported options: allowed_tags - Comma separated html tags that have not to be converted
public
htmlescapeDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Return values
stringifDirective()
public
ifDirective(mixed $construction) : mixed
Parameters
- $construction : mixed
includeDirective()
public
includeDirective(mixed $construction) : mixed
Parameters
- $construction : mixed
inlinecssDirective()
This directive will allow CSS files to be applied inline to the HTML in the email template.
public
inlinecssDirective(array<string|int, mixed> $construction) : string
Syntax: {{inlinecss file=""}} If this directive is used, the file will be stored on this object so that it can be retrieved later
Parameters
- $construction : array<string|int, mixed>
Return values
stringlayoutDirective()
Retrieve layout html directive
public
layoutDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringmediaDirective()
Retrieve media file URL directive
public
mediaDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Return values
stringmodifierEscape()
Escape specified string
public
modifierEscape(string $value[, string $type = 'html' ]) : string
Parameters
- $value : string
- $type : string = 'html'
Return values
stringprotocolDirective()
HTTP Protocol directive
public
protocolDirective(array<string|int, mixed> $construction) : string
Using: {{protocol}} - current protocol http or https {{protocol url="www.domain.com/"}} domain URL with current protocol {{protocol http="http://url" https="https://url"} also allow additional parameter "store"
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringsetIncludeProcessor()
Sets the proccessor of includes.
public
setIncludeProcessor(array<string|int, mixed> $callback) : mixed
Parameters
- $callback : array<string|int, mixed>
-
it must return string
setPlainTemplateMode()
Setter
public
setPlainTemplateMode(bool $plainTemplateMode) : $this
Parameters
- $plainTemplateMode : bool
Return values
$thissetStoreId()
Setter
public
setStoreId(Mage_Core_Model_Store|int $storeId) : $this
Parameters
- $storeId : Mage_Core_Model_Store|int
Return values
$thissetTemplateProcessor()
Sets the proccessor of templates. Templates are directives that include email templates based on system configuration path.
public
setTemplateProcessor(array<string|int, mixed> $callback) : mixed
Parameters
- $callback : array<string|int, mixed>
-
it must return string
setUseAbsoluteLinks()
Set use absolute links flag
public
setUseAbsoluteLinks(bool $flag) : $this
Parameters
- $flag : bool
Return values
$thissetUseSessionInUrl()
Setter whether SID is allowed in store directive
public
setUseSessionInUrl(bool $flag) : $this
Parameters
- $flag : bool
Attributes
- #[Override]
Return values
$thissetVariables()
Sets template variables that's can be called through {var ...} statement
public
setVariables(array<string|int, mixed> $variables) : mixed
Parameters
- $variables : array<string|int, mixed>
skinDirective()
Retrieve Skin URL directive
public
skinDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringstoreDirective()
Retrieve store URL directive Support url and direct_url properties
public
storeDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Return values
stringtemplateDirective()
This directive allows email templates to be included inside other email templates using the following syntax: {{template config_path="<PATH>"}}, where <PATH> equals the XPATH to the system configuration value that contains the value of the email template. For example "sales_email/order/template", which is stored in the Mage_Sales_Model_Order::sales_email/order/template. This directive is useful to include things like a global header/footer.
public
templateDirective(mixed $construction) : mixed|string
Parameters
- $construction : mixed
Return values
mixed|stringvarDirective()
Var directive with modifiers support
public
varDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Tags
Attributes
- #[Override]
Return values
stringwidgetDirective()
Generate widget
public
widgetDirective(array<string|int, mixed> $construction) : string
Parameters
- $construction : array<string|int, mixed>
Return values
string_amplifyModifiers()
Apply modifiers one by one, with specified params
protected
_amplifyModifiers(string $value, string $modifiers) : string
Modifier syntax: modifier1[:param1:param2:...][|modifier2:...]
Parameters
- $value : string
- $modifiers : string
Return values
string_getBlockParameters()
Retrieve block parameters
protected
_getBlockParameters(mixed $value) : array<string|int, mixed>
Parameters
- $value : mixed
Return values
array<string|int, mixed>_getIncludeParameters()
Return associative array of include construction.
protected
_getIncludeParameters(string $value) : array<string|int, mixed>
Parameters
- $value : string
-
raw parameters
Return values
array<string|int, mixed>_getVariable()
Return variable value for var construction
protected
_getVariable(string $value[, string $default = '{no_value_defined}' ]) : string
Parameters
- $value : string
-
raw parameters
- $default : string = '{no_value_defined}'
-
default value
Tags
Attributes
- #[Override]
Return values
string_setInlineCssFile()
Set filename of CSS file to inline
protected
_setInlineCssFile(string $filename) : $this
Parameters
- $filename : string
Return values
$thisgetEmailPathValidator()
Retrieve model object
protected
getEmailPathValidator() : Mage_Adminhtml_Model_Email_PathValidator