Mage_Adminhtml_Model_LayoutUpdate_Validator
in package
Validator for custom layout update
Validator checked XML validation and protected expressions
Table of Contents
Constants
- INVALID_BLOCK_NAME : mixed = 'invalidBlockName'
- INVALID_TEMPLATE_PATH : mixed = 'invalidTemplatePath'
- PROTECTED_ATTR_HELPER_IN_TAG_ACTION_VAR : mixed = 'protectedAttrHelperInActionVar'
- XML_INVALID : mixed = 'invalidXml'
Properties
- $_disallowedBlock : array<string|int, mixed>
- Disallowed template name
- $_disallowedXPathExpressions : array<string|int, mixed>
- XPath expression for checking layout update
- $_messageTemplates : array<string|int, mixed>
- $_protectedExpressions : array<string|int, mixed>
- Protected expressions
- $_validator : Mage_Core_Model_Layout_Validator
- $_value : Element
- The Varien SimpleXml object
Methods
- __construct() : mixed
- getMessages() : array<string|int, mixed>
- Returns array of validation failure messages
- isValid() : bool
- Returns true if and only if $value meets the validation requirements
- _getXpathBlockValidationExpression() : string
- Returns xPath for validate incorrect block name
- _getXpathValidationExpression() : string
- Returns xPath for validate incorrect path to template
- _initMessageTemplates() : Mage_Adminhtml_Model_LayoutUpdate_Validator
- Initialize messages templates with translating
- _initValidator() : mixed
- Initialize the validator instance with populated template messages
- _validateTemplatePath() : mixed
- Validate template path for preventing access to the directory above If template path value has "../" @throws Exception
Constants
INVALID_BLOCK_NAME
public
mixed
INVALID_BLOCK_NAME
= 'invalidBlockName'
INVALID_TEMPLATE_PATH
public
mixed
INVALID_TEMPLATE_PATH
= 'invalidTemplatePath'
PROTECTED_ATTR_HELPER_IN_TAG_ACTION_VAR
public
mixed
PROTECTED_ATTR_HELPER_IN_TAG_ACTION_VAR
= 'protectedAttrHelperInActionVar'
XML_INVALID
public
mixed
XML_INVALID
= 'invalidXml'
Properties
$_disallowedBlock
Disallowed template name
protected
array<string|int, mixed>
$_disallowedBlock
= []
$_disallowedXPathExpressions
XPath expression for checking layout update
protected
array<string|int, mixed>
$_disallowedXPathExpressions
= []
$_messageTemplates
protected
array<string|int, mixed>
$_messageTemplates
= []
$_protectedExpressions
Protected expressions
protected
array<string|int, mixed>
$_protectedExpressions
= []
$_validator
protected
Mage_Core_Model_Layout_Validator
$_validator
$_value
The Varien SimpleXml object
protected
Element
$_value
Methods
__construct()
public
__construct() : mixed
getMessages()
Returns array of validation failure messages
public
getMessages() : array<string|int, mixed>
Return values
array<string|int, mixed>isValid()
Returns true if and only if $value meets the validation requirements
public
isValid(Element|string $value) : bool
If $value fails validation, then this method returns false, and getMessages() will return an array of messages that explain why the validation failed.
Parameters
- $value : Element|string
Tags
Return values
bool_getXpathBlockValidationExpression()
Returns xPath for validate incorrect block name
protected
_getXpathBlockValidationExpression() : string
Return values
string —xPath for validate incorrect block name
_getXpathValidationExpression()
Returns xPath for validate incorrect path to template
protected
_getXpathValidationExpression() : string
Return values
string —xPath for validate incorrect path to template
_initMessageTemplates()
Initialize messages templates with translating
protected
_initMessageTemplates() : Mage_Adminhtml_Model_LayoutUpdate_Validator
Return values
Mage_Adminhtml_Model_LayoutUpdate_Validator_initValidator()
Initialize the validator instance with populated template messages
protected
_initValidator() : mixed
_validateTemplatePath()
Validate template path for preventing access to the directory above If template path value has "../" @throws Exception
protected
_validateTemplatePath(array<string|int, mixed> $templatePaths) : mixed
Parameters
- $templatePaths : array<string|int, mixed>