Mage_Rule_Model_Condition_Product_Abstract
extends Mage_Rule_Model_Condition_Abstract
in package
Abstract Rule product condition data model
Table of Contents
Properties
- $_arrayInputTypes : array<string|int, mixed>
- List of input types for values which should be array
- $_data : array<string|int, mixed>|null
- Object attributes
- $_defaultOperatorInputByType : array<string|int, mixed>
- Default combinations of operator options, depending on input type
- $_defaultOperatorOptions : array<string|int, mixed>
- Default values for possible operator options
- $_dirty : array<string|int, mixed>
- $_entityAttributeValues : array<string|int, mixed>
- All attribute values as array in form: array( [entity_id_1] => array( [store_id_1] => store_value_1, [store_id_2] => store_value_2, ... [store_id_n] => store_value_n ), ... )
- $_hasDataChanges : bool
- Data changes flag (true after setData|unsetData call)
- $_idFieldName : string
- Name of object id field
- $_inputType : string
- Defines which operators will be available for this condition
- $_isDeleted : bool
- Object delete flag
- $_isUsedForRuleProperty : string
- Attribute data key that indicates whether it should be used for rules
- $_oldFieldsMap : array<string|int, mixed>
- Map short fields names to its full names
- $_ruleResourceHelper : Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder
- Rule condition SQL builder
- $_syncFieldsMap : mixed
- Map of fields to sync to other fields upon changing their data
- $_underscoreCache : array<string|int, mixed>
- Setter/Getter underscore transformation cache
- $translate : bool
- Flag to enable translation for loadOperatorOptions/loadValueOptions/loadAggregatorOptions/getDefaultOperatorOptions It's useless to translate these data on frontend
Methods
- __call() : mixed
- Set/Get attribute wrapper
- __construct() : mixed
- Constructor
- __get() : mixed
- Attribute getter (deprecated)
- __set() : mixed
- Attribute setter (deprecated)
- __toArray() : array<string|int, mixed>
- Convert object attributes to array
- addData() : $this
- Add data to the object.
- asArray() : array<string|int, mixed>
- asHtml() : string
- asHtmlRecursive() : string
- asString() : string
- asStringRecursive() : string
- asXml() : string
- bindArrayOfIds() : array<string|int, mixed>
- Prepare bind array of ids from string or array
- collectValidatedAttributes() : $this
- Collect validated attributes
- correctOperator() : string
- Correct '==' and '!=' operators Categories can't be equal because product is included categories selected by administrator and in their parents
- debug() : string|array<string|int, mixed>
- Present object data as string in debug mode
- flagDirty() : $this
- getAddLinkHtml() : string
- getAttribute() : string|false
- getAttributeElement() : Varien_Data_Form_Element_Abstract
- Retrieve attribute element
- getAttributeElementHtml() : string
- getAttributeName() : array<string|int, mixed>
- getAttributeObject() : Mage_Catalog_Model_Resource_Eav_Attribute
- Retrieve attribute object
- getAttributeOption() : array<string|int, mixed>
- getAttributeOptions() : array<string|int, mixed>
- getAttributeSelectOptions() : array<string|int, mixed>
- getChooserContainerHtml() : string
- getData() : mixed
- Object data getter
- getDataByKey() : mixed
- Get object data by particular key
- getDataByPath() : mixed
- Get object data by path
- getDataSetDefault() : mixed
- Fast get data or set default if value is not available
- getDataUsingMethod() : mixed
- Get object data by key with calling getter method
- getDefaultOperatorInputByType() : array<string|int, mixed>
- Customize default operator input by type mapper for some types
- getDefaultOperatorOptions() : array<string|int, mixed>
- Default operator options getter Provides all possible operator options
- getExplicitApply() : bool
- Retrieve Explicit Apply
- getForm() : Varien_Data_Form
- getId() : mixed
- Retrieve object id
- getIdFieldName() : string
- Retrieve name of object id field
- getInputType() : string
- Retrieve input type
- getIsValueParsed() : string|false
- getJsFormObject() : string
- getNewChildName() : string
- getNewChildSelectOptions() : array<string|int, mixed>
- Get inherited conditions selectors
- getOperator() : string|false
- getOperatorByInputType() : array<string|int, mixed>
- getOperatorElement() : Varien_Data_Form_Element_Abstract
- Retrieve Condition Operator element Instance If the operator value is empty - define first available operator value as default
- getOperatorElementHtml() : string
- getOperatorForValidate() : string
- Get correct operator for validation
- getOperatorName() : array<string|int, mixed>
- getOperatorOption() : array<string|int, mixed>
- getOperatorOptions() : array<string|int, mixed>
- getOperatorSelectOptions() : array<string|int, mixed>
- getPrefix() : string
- getRemoveLinkHtml() : string
- getRule() : Mage_Rule_Model_Abstract
- getRuleResourceHelper() : Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder
- Rule condition SQL builder getter
- getType() : string|false
- getTypeElement() : Varien_Data_Form_Element_Abstract
- getTypeElementHtml() : string
- getValue() : string|int|array<string|int, mixed>|null
- getValueAfterElementHtml() : string
- Retrieve after element HTML
- getValueElement() : Varien_Data_Form_Element_Abstract
- getValueElementChooserUrl() : string
- Retrieve value element chooser URL
- getValueElementHtml() : string
- getValueElementRenderer() : false|Mage_Rule_Block_Editable|object
- getValueElementType() : string
- Retrieve value element type
- getValueName() : string
- getValueOption() : string
- Retrieve value by option
- getValueParsed() : array<string|int, mixed>|string|int|float
- Retrieve parsed value
- getValueSelectOptions() : array<string|int, mixed>
- Retrieve select option values
- hasData() : bool
- If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
- hasDataChanges() : bool
- Get data change status
- hasValueOption() : bool
- hasValueParsed() : bool
- isArrayOperatorType() : bool
- Check if value should be array
- isDeleted() : bool
- Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
- isDirty() : bool
- isEmpty() : bool
- checks whether the object is empty
- loadArray() : $this
- loadAttributeOptions() : $this
- Load attribute options
- loadOperatorOptions() : $this
- loadValueOptions() : $this
- loadXml() : $this
- offsetExists() : bool
- Implementation of ArrayAccess::offsetExists()
- offsetGet() : mixed
- Implementation of ArrayAccess::offsetGet()
- offsetSet() : void
- Implementation of ArrayAccess::offsetSet()
- offsetUnset() : void
- Implementation of ArrayAccess::offsetUnset()
- prepareConditionSql() : string
- Prepare sql where by condition
- serialize() : string
- serialize object attributes
- setAttribute() : $this
- setAttributeOption() : $this
- setData() : $this
- Overwrite data in the object.
- setDataChanges() : $this
- Clears data changes status
- setDataUsingMethod() : $this
- Set object data with calling setter method
- setId() : $this
- Set object id field value
- setIdFieldName() : $this
- set name of object id field
- setIsValueParsed() : $this
- setJsFormObject() : $this
- setOperator() : $this
- setOperatorByInputType() : $this
- setOperatorOption() : $this
- setRuleResourceHelper() : mixed
- Rule condition SQL builder setter
- setType() : $this
- setValue() : $this
- setValueOption() : $this
- setValueParsed() : $this
- toArray() : array<string|int, mixed>
- Public wrapper for __toArray
- toJson() : string
- Public wrapper for __toJson
- toString() : string
- Public wrapper for __toString
- toXml() : string
- Public wrapper for __toXml
- unsetData() : $this
- Unset data from the object.
- unsetOldData() : $this
- Unset old fields data from the object.
- validate() : bool
- Validate product attribute value for condition
- validateAttribute() : bool
- Validate product attribute value for condition
- __toJson() : string
- Convert object attributes to JSON
- __toXml() : string
- Convert object attributes to XML
- _addFullNames() : mixed
- _addSpecialAttributes() : mixed
- Add special attributes
- _camelize() : string
- _compareValues() : bool
- Case and type insensitive comparison of values
- _construct() : void
- Internal constructor not depended on params. Can be used for object initialization
- _getData() : mixed
- Get value from _data array without parse key
- _initOldFieldsMap() : mixed
- Inits mapping array of object's previously used fields to new fields.
- _prepareArray() : array<string|int, mixed>
- Set required array elements
- _prepareSyncFieldsMap() : $this
- Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
- _prepareValueOptions() : $this
- Prepares values options to be used as select options or hashed array Result is stored in following keys: 'value_select_options' - normal select array: array(array('value' => $value, 'label' => $label), ...) 'value_option' - hashed array: array($value => $label, ...),
- _underscore() : string
- Converts field names for setters and getters
Properties
$_arrayInputTypes
List of input types for values which should be array
protected
array<string|int, mixed>
$_arrayInputTypes
= []
$_data
Object attributes
protected
array<string|int, mixed>|null
$_data
= []
$_defaultOperatorInputByType
Default combinations of operator options, depending on input type
protected
array<string|int, mixed>
$_defaultOperatorInputByType
= \null
$_defaultOperatorOptions
Default values for possible operator options
protected
array<string|int, mixed>
$_defaultOperatorOptions
= \null
$_dirty
protected
array<string|int, mixed>
$_dirty
$_entityAttributeValues
All attribute values as array in form: array( [entity_id_1] => array( [store_id_1] => store_value_1, [store_id_2] => store_value_2, ... [store_id_n] => store_value_n ), ... )
protected
array<string|int, mixed>
$_entityAttributeValues
= \null
Will be set only for not global scope attribute
$_hasDataChanges
Data changes flag (true after setData|unsetData call)
protected
bool
$_hasDataChanges
= \false
$_idFieldName
Name of object id field
protected
string
$_idFieldName
= \null
$_inputType
Defines which operators will be available for this condition
protected
string
$_inputType
= \null
$_isDeleted
Object delete flag
protected
bool
$_isDeleted
= \false
$_isUsedForRuleProperty
Attribute data key that indicates whether it should be used for rules
protected
string
$_isUsedForRuleProperty
= 'is_used_for_promo_rules'
$_oldFieldsMap
Map short fields names to its full names
protected
array<string|int, mixed>
$_oldFieldsMap
= []
$_ruleResourceHelper
Rule condition SQL builder
protected
Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder
$_ruleResourceHelper
$_syncFieldsMap
Map of fields to sync to other fields upon changing their data
protected
mixed
$_syncFieldsMap
= []
$_underscoreCache
Setter/Getter underscore transformation cache
protected
static array<string|int, mixed>
$_underscoreCache
= []
$translate
Flag to enable translation for loadOperatorOptions/loadValueOptions/loadAggregatorOptions/getDefaultOperatorOptions It's useless to translate these data on frontend
protected
static bool
$translate
Methods
__call()
Set/Get attribute wrapper
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
- $args : array<string|int, mixed>
__construct()
Constructor
public
__construct() : mixed
By default, is looking for first argument as array and assigns it as object attributes This behaviour may change in child classes
__get()
Attribute getter (deprecated)
public
__get(string $var) : mixed
Parameters
- $var : string
__set()
Attribute setter (deprecated)
public
__set(string $var, mixed $value) : mixed
Parameters
- $var : string
- $value : mixed
__toArray()
Convert object attributes to array
public
__toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
Return values
array<string|int, mixed>addData()
Add data to the object.
public
addData(array<string|int, mixed> $arr) : $this
Retains previous data in the object.
Parameters
- $arr : array<string|int, mixed>
Return values
$thisasArray()
public
asArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>asHtml()
public
asHtml() : string
Return values
stringasHtmlRecursive()
public
asHtmlRecursive() : string
Return values
stringasString()
public
asString([string $format = '' ]) : string
Parameters
- $format : string = ''
Return values
stringasStringRecursive()
public
asStringRecursive([int $level = 0 ]) : string
Parameters
- $level : int = 0
Return values
stringasXml()
public
asXml() : string
Return values
stringbindArrayOfIds()
Prepare bind array of ids from string or array
public
bindArrayOfIds(string|int|array<string|int, mixed> $value) : array<string|int, mixed>
Parameters
- $value : string|int|array<string|int, mixed>
Return values
array<string|int, mixed>collectValidatedAttributes()
Collect validated attributes
public
collectValidatedAttributes(Mage_Catalog_Model_Resource_Product_Collection $productCollection) : $this
Parameters
- $productCollection : Mage_Catalog_Model_Resource_Product_Collection
Return values
$thiscorrectOperator()
Correct '==' and '!=' operators Categories can't be equal because product is included categories selected by administrator and in their parents
public
correctOperator(string $operator, string $inputType) : string
Parameters
- $operator : string
- $inputType : string
Return values
stringdebug()
Present object data as string in debug mode
public
debug([mixed $data = null ][, array<string|int, mixed> &$objects = [] ]) : string|array<string|int, mixed>
Parameters
- $data : mixed = null
- $objects : array<string|int, mixed> = []
Return values
string|array<string|int, mixed>flagDirty()
public
flagDirty(string $field[, bool $flag = true ]) : $this
Parameters
- $field : string
- $flag : bool = true
Return values
$thisgetAddLinkHtml()
public
getAddLinkHtml() : string
Return values
stringgetAttribute()
public
getAttribute() : string|false
Return values
string|falsegetAttributeElement()
Retrieve attribute element
public
getAttributeElement() : Varien_Data_Form_Element_Abstract
Attributes
- #[Override]
Return values
Varien_Data_Form_Element_AbstractgetAttributeElementHtml()
public
getAttributeElementHtml() : string
Return values
stringgetAttributeName()
public
getAttributeName() : array<string|int, mixed>
Return values
array<string|int, mixed>getAttributeObject()
Retrieve attribute object
public
getAttributeObject() : Mage_Catalog_Model_Resource_Eav_Attribute
Return values
Mage_Catalog_Model_Resource_Eav_AttributegetAttributeOption()
public
getAttributeOption() : array<string|int, mixed>
Return values
array<string|int, mixed>getAttributeOptions()
public
getAttributeOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getAttributeSelectOptions()
public
getAttributeSelectOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getChooserContainerHtml()
public
getChooserContainerHtml() : string
Return values
stringgetData()
Object data getter
public
getData([string $key = '' ][, string|int $index = null ]) : mixed
If $key is not defined will return all the data as an array. Otherwise, it will return value of the element specified by $key. It is possible to use keys like a/b/c for access nested array data
If $index is specified it will assume that attribute data is an array and retrieve corresponding member. If data is the string - it will be explode by new line character and converted to array.
Parameters
- $key : string = ''
- $index : string|int = null
getDataByKey()
Get object data by particular key
public
getDataByKey(string $key) : mixed
Parameters
- $key : string
getDataByPath()
Get object data by path
public
getDataByPath(string $path) : mixed
Method consider the path as chain of keys: a/b/c => ['a']['b']['c']
Parameters
- $path : string
getDataSetDefault()
Fast get data or set default if value is not available
public
getDataSetDefault(string $key, mixed $default) : mixed
Parameters
- $key : string
- $default : mixed
getDataUsingMethod()
Get object data by key with calling getter method
public
getDataUsingMethod(string $key[, mixed $args = null ]) : mixed
Parameters
- $key : string
- $args : mixed = null
getDefaultOperatorInputByType()
Customize default operator input by type mapper for some types
public
getDefaultOperatorInputByType() : array<string|int, mixed>
Attributes
- #[Override]
Return values
array<string|int, mixed>getDefaultOperatorOptions()
Default operator options getter Provides all possible operator options
public
getDefaultOperatorOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getExplicitApply()
Retrieve Explicit Apply
public
getExplicitApply() : bool
Return values
boolgetForm()
public
getForm() : Varien_Data_Form
Return values
Varien_Data_FormgetId()
Retrieve object id
public
getId() : mixed
getIdFieldName()
Retrieve name of object id field
public
getIdFieldName() : string
Return values
stringgetInputType()
Retrieve input type
public
getInputType() : string
Attributes
- #[Override]
Return values
stringgetIsValueParsed()
public
getIsValueParsed() : string|false
Return values
string|falsegetJsFormObject()
public
getJsFormObject() : string
Return values
stringgetNewChildName()
public
getNewChildName() : string
Return values
stringgetNewChildSelectOptions()
Get inherited conditions selectors
public
getNewChildSelectOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getOperator()
public
getOperator() : string|false
Return values
string|falsegetOperatorByInputType()
public
getOperatorByInputType() : array<string|int, mixed>
Return values
array<string|int, mixed>getOperatorElement()
Retrieve Condition Operator element Instance If the operator value is empty - define first available operator value as default
public
getOperatorElement() : Varien_Data_Form_Element_Abstract
Return values
Varien_Data_Form_Element_AbstractgetOperatorElementHtml()
public
getOperatorElementHtml() : string
Return values
stringgetOperatorForValidate()
Get correct operator for validation
public
getOperatorForValidate() : string
Attributes
- #[Override]
Return values
stringgetOperatorName()
public
getOperatorName() : array<string|int, mixed>
Return values
array<string|int, mixed>getOperatorOption()
public
getOperatorOption(string $value) : array<string|int, mixed>
Parameters
- $value : string
Return values
array<string|int, mixed>getOperatorOptions()
public
getOperatorOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getOperatorSelectOptions()
public
getOperatorSelectOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>getPrefix()
public
getPrefix() : string
Return values
stringgetRemoveLinkHtml()
public
getRemoveLinkHtml() : string
Return values
stringgetRule()
public
getRule() : Mage_Rule_Model_Abstract
Return values
Mage_Rule_Model_AbstractgetRuleResourceHelper()
Rule condition SQL builder getter
public
getRuleResourceHelper() : Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder
Return values
Mage_Rule_Model_Resource_Rule_Condition_SqlBuildergetType()
public
getType() : string|false
Return values
string|falsegetTypeElement()
public
getTypeElement() : Varien_Data_Form_Element_Abstract
Return values
Varien_Data_Form_Element_AbstractgetTypeElementHtml()
public
getTypeElementHtml() : string
Return values
stringgetValue()
public
getValue() : string|int|array<string|int, mixed>|null
Return values
string|int|array<string|int, mixed>|nullgetValueAfterElementHtml()
Retrieve after element HTML
public
getValueAfterElementHtml() : string
Return values
stringgetValueElement()
public
getValueElement() : Varien_Data_Form_Element_Abstract
Return values
Varien_Data_Form_Element_AbstractgetValueElementChooserUrl()
Retrieve value element chooser URL
public
getValueElementChooserUrl() : string
Return values
stringgetValueElementHtml()
public
getValueElementHtml() : string
Return values
stringgetValueElementRenderer()
public
getValueElementRenderer() : false|Mage_Rule_Block_Editable|object
Return values
false|Mage_Rule_Block_Editable|objectgetValueElementType()
Retrieve value element type
public
getValueElementType() : string
Attributes
- #[Override]
Return values
stringgetValueName()
public
getValueName() : string
Return values
stringgetValueOption()
Retrieve value by option
public
getValueOption([mixed $option = null ]) : string
Parameters
- $option : mixed = null
Return values
stringgetValueParsed()
Retrieve parsed value
public
getValueParsed() : array<string|int, mixed>|string|int|float
Return values
array<string|int, mixed>|string|int|floatgetValueSelectOptions()
Retrieve select option values
public
getValueSelectOptions() : array<string|int, mixed>
Attributes
- #[Override]
Return values
array<string|int, mixed>hasData()
If $key is empty, checks whether there's any data in the object Otherwise checks if the specified attribute is set.
public
hasData([string $key = '' ]) : bool
Parameters
- $key : string = ''
Return values
boolhasDataChanges()
Get data change status
public
hasDataChanges() : bool
Return values
boolhasValueOption()
public
hasValueOption() : bool
Return values
boolhasValueParsed()
public
hasValueParsed() : bool
Return values
boolisArrayOperatorType()
Check if value should be array
public
isArrayOperatorType() : bool
Depends on operator input type
Return values
boolisDeleted()
Set _isDeleted flag value (if $isDeleted param is defined) and return current flag value
public
isDeleted([bool $isDeleted = null ]) : bool
Parameters
- $isDeleted : bool = null
Return values
boolisDirty()
public
isDirty([string $field = null ]) : bool
Parameters
- $field : string = null
Return values
boolisEmpty()
checks whether the object is empty
public
isEmpty() : bool
Return values
boolloadArray()
public
loadArray(mixed $arr) : $this
Parameters
- $arr : mixed
Attributes
- #[Override]
Return values
$thisloadAttributeOptions()
Load attribute options
public
loadAttributeOptions() : $this
Attributes
- #[Override]
Return values
$thisloadOperatorOptions()
public
loadOperatorOptions() : $this
Return values
$thisloadValueOptions()
public
loadValueOptions() : $this
Return values
$thisloadXml()
public
loadXml(SimpleXMLElement|string $xml) : $this
Parameters
- $xml : SimpleXMLElement|string
Return values
$thisoffsetExists()
Implementation of ArrayAccess::offsetExists()
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Tags
Attributes
- #[Override]
Return values
booloffsetGet()
Implementation of ArrayAccess::offsetGet()
public
offsetGet(string $offset) : mixed
Parameters
- $offset : string
Tags
Attributes
- #[Override]
- #[ReturnTypeWillChange]
offsetSet()
Implementation of ArrayAccess::offsetSet()
public
offsetSet(string $offset, mixed $value) : void
Parameters
- $offset : string
- $value : mixed
Tags
Attributes
- #[Override]
offsetUnset()
Implementation of ArrayAccess::offsetUnset()
public
offsetUnset(string $offset) : void
Parameters
- $offset : string
Tags
Attributes
- #[Override]
prepareConditionSql()
Prepare sql where by condition
public
prepareConditionSql() : string
Attributes
- #[Override]
Return values
stringserialize()
serialize object attributes
public
serialize([array<string|int, mixed> $attributes = [] ][, string $valueSeparator = '=' ][, string $fieldSeparator = ' ' ][, string $quote = '"' ]) : string
Parameters
- $attributes : array<string|int, mixed> = []
- $valueSeparator : string = '='
- $fieldSeparator : string = ' '
- $quote : string = '"'
Return values
stringsetAttribute()
public
setAttribute(string|false $value) : $this
Parameters
- $value : string|false
Return values
$thissetAttributeOption()
public
setAttributeOption(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetData()
Overwrite data in the object.
public
setData(string|array<string|int, mixed> $key[, mixed $value = null ]) : $this
$key can be string or array. If $key is string, the attribute value will be overwritten by $value
If $key is an array, it will overwrite all the data in the object.
Parameters
- $key : string|array<string|int, mixed>
- $value : mixed = null
Return values
$thissetDataChanges()
Clears data changes status
public
setDataChanges(bool $value) : $this
Parameters
- $value : bool
Return values
$thissetDataUsingMethod()
Set object data with calling setter method
public
setDataUsingMethod(string $key[, mixed $args = [] ]) : $this
Parameters
- $key : string
- $args : mixed = []
Return values
$thissetId()
Set object id field value
public
setId(mixed $value) : $this
Parameters
- $value : mixed
Return values
$thissetIdFieldName()
set name of object id field
public
setIdFieldName(string $name) : $this
Parameters
- $name : string
Return values
$thissetIsValueParsed()
public
setIsValueParsed(string|false $value) : $this
Parameters
- $value : string|false
Return values
$thissetJsFormObject()
public
setJsFormObject(string $value) : $this
Parameters
- $value : string
Return values
$thissetOperator()
public
setOperator(string|false $value) : $this
Parameters
- $value : string|false
Return values
$thissetOperatorByInputType()
public
setOperatorByInputType(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetOperatorOption()
public
setOperatorOption(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetRuleResourceHelper()
Rule condition SQL builder setter
public
setRuleResourceHelper(Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder $ruleHelper) : mixed
Parameters
- $ruleHelper : Mage_Rule_Model_Resource_Rule_Condition_SqlBuilder
setType()
public
setType(string $value) : $this
Parameters
- $value : string
Return values
$thissetValue()
public
setValue(string|false $value) : $this
Parameters
- $value : string|false
Return values
$thissetValueOption()
public
setValueOption(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thissetValueParsed()
public
setValueParsed(array<string|int, mixed> $value) : $this
Parameters
- $value : array<string|int, mixed>
Return values
$thistoArray()
Public wrapper for __toArray
public
toArray([array<string|int, mixed> $arrAttributes = [] ]) : array<string|int, mixed>
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
array<string|int, mixed>toJson()
Public wrapper for __toJson
public
toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
Return values
stringtoString()
Public wrapper for __toString
public
toString([string $format = '' ]) : string
Will use $format as an template and substitute {{key}} for attributes
Parameters
- $format : string = ''
Return values
stringtoXml()
Public wrapper for __toXml
public
toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
- $rootName : string = 'item'
- $addOpenTag : bool = false
- $addCdata : bool = true
Return values
stringunsetData()
Unset data from the object.
public
unsetData([string $key = null ]) : $this
$key can be a string only. Array will be ignored.
Parameters
- $key : string = null
Return values
$thisunsetOldData()
Unset old fields data from the object.
public
unsetOldData([string $key = null ]) : $this
$key can be a string only. Array will be ignored.
Parameters
- $key : string = null
Return values
$thisvalidate()
Validate product attribute value for condition
public
validate(Varien_Object $object) : bool
Parameters
- $object : Varien_Object
Attributes
- #[Override]
Return values
boolvalidateAttribute()
Validate product attribute value for condition
public
validateAttribute(mixed $validatedValue) : bool
Parameters
- $validatedValue : mixed
-
product attribute value
Return values
bool__toJson()
Convert object attributes to JSON
protected
__toJson([array<string|int, mixed> $arrAttributes = [] ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
Return values
string__toXml()
Convert object attributes to XML
protected
__toXml([array<string|int, mixed> $arrAttributes = [] ][, string $rootName = 'item' ][, bool $addOpenTag = false ][, bool $addCdata = true ]) : string
Parameters
- $arrAttributes : array<string|int, mixed> = []
-
array of required attributes
- $rootName : string = 'item'
-
name of the root element
- $addOpenTag : bool = false
- $addCdata : bool = true
Return values
string_addFullNames()
protected
_addFullNames() : mixed
_addSpecialAttributes()
Add special attributes
protected
_addSpecialAttributes(array<string|int, mixed> &$attributes) : mixed
Parameters
- $attributes : array<string|int, mixed>
_camelize()
protected
_camelize(string $name) : string
Parameters
- $name : string
Return values
string_compareValues()
Case and type insensitive comparison of values
protected
_compareValues(string|int|float $validatedValue, string|int|float $value[, bool $strict = true ]) : bool
Parameters
- $validatedValue : string|int|float
- $value : string|int|float
- $strict : bool = true
Return values
bool_construct()
Internal constructor not depended on params. Can be used for object initialization
protected
_construct() : void
_getData()
Get value from _data array without parse key
protected
_getData(string $key) : mixed
Parameters
- $key : string
_initOldFieldsMap()
Inits mapping array of object's previously used fields to new fields.
protected
_initOldFieldsMap() : mixed
Must be overloaded by descendants to set concrete fields map.
_prepareArray()
Set required array elements
protected
_prepareArray(array<string|int, mixed> &$arr[, array<string|int, mixed> $elements = [] ]) : array<string|int, mixed>
Parameters
- $arr : array<string|int, mixed>
- $elements : array<string|int, mixed> = []
Return values
array<string|int, mixed>_prepareSyncFieldsMap()
Called after old fields are inited. Forms synchronization map to sync old fields and new fields between each other.
protected
_prepareSyncFieldsMap() : $this
Return values
$this_prepareValueOptions()
Prepares values options to be used as select options or hashed array Result is stored in following keys: 'value_select_options' - normal select array: array(array('value' => $value, 'label' => $label), ...) 'value_option' - hashed array: array($value => $label, ...),
protected
_prepareValueOptions() : $this
Return values
$this_underscore()
Converts field names for setters and getters
protected
_underscore(string $name) : string
$this->setMyField($value) === $this->setData('my_field', $value) Uses cache to eliminate unnecessary preg_replace
Parameters
- $name : string