Class Mage_Rule_Model_Rule

Description

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@magentocommerce.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Located in /Rule/Model/Rule.php (line 27)

Varien_Object
   |
   --Mage_Core_Model_Abstract
      |
      --Mage_Rule_Model_Rule
Direct descendents
Class Description
Mage_SalesRule_Model_Rule Magento
Mage_CatalogRule_Model_Rule Magento
Variable Summary
mixed $_actions
mixed $_conditions
mixed $_form
boolean $_isDeleteable
boolean $_isReadonly
Method Summary
void afterLoad ()
array asArray ([ $arrAttributes = array()])
void asHtml ()
void asString ([ $format = ''])
void getActions ()
void getForm ()
boolean isDeleteable ()
boolean isReadonly ()
void loadPost ( $rule)
void setActions ( $actions)
void setConditions ( $conditions)
void validate ( $object)
boolean|array validateData ( $object)
void _afterLoad ()
unknown_type _construct ()
void _convertFlatToRecursive ( $rule)
void _resetActions ([ $actions = null])
void _resetConditions ([ $conditions = null])
Variables
mixed $_actions (line 30)
  • access: protected
mixed $_conditions (line 29)
  • access: protected
mixed $_form (line 31)
  • access: protected
boolean $_isDeleteable = true (line 38)

Is model deleteable

  • access: protected
boolean $_isReadonly = false (line 45)

Is model readonly

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::$_cacheTag
Mage_Core_Model_Abstract::$_dataSaveAllowed
Mage_Core_Model_Abstract::$_eventObject
Mage_Core_Model_Abstract::$_eventPrefix
Mage_Core_Model_Abstract::$_isObjectNew
Mage_Core_Model_Abstract::$_resource
Mage_Core_Model_Abstract::$_resourceCollectionName
Mage_Core_Model_Abstract::$_resourceName
Methods
afterLoad (line 233)
  • access: public
void afterLoad ()

Redefinition of:
Mage_Core_Model_Abstract::afterLoad()
Object after load processing. Implemented as public interface for supporting objects after load in collections
asArray (line 214)

Returns rule as an array for admin interface

Output example: array( 'name'=>'Example rule', 'conditions'=>{condition_combine::asArray} 'actions'=>{action_collection::asArray} )

  • access: public
array asArray ([ $arrAttributes = array()])
  • array $arrAttributes
asHtml (line 142)
  • access: public
void asHtml ()
asString (line 131)
  • access: public
void asString ([ $format = ''])
  • $format
getActions (line 115)
  • access: public
void getActions ()
getActionsInstance (line 93)
  • access: public
void getActionsInstance ()

Redefined in descendants as:
getConditions (line 85)

Retrieve Condition model

  • access: public
getConditionsInstance (line 58)
  • access: public
void getConditionsInstance ()

Redefined in descendants as:
getForm (line 123)
  • access: public
void getForm ()
isDeleteable (line 309)

Check availabitlity to delete model

  • access: public
boolean isDeleteable ()
isReadonly (line 332)

Checks model is readonly

  • access: public
boolean isReadonly ()
loadPost (line 153)
  • access: public
void loadPost ( $rule)
  • array $rule

Redefined in descendants as:
setActions (line 109)
  • access: public
void setActions ( $actions)
  • $actions
setConditions (line 74)
  • access: public
void setConditions ( $conditions)
  • $conditions
setIsDeleteable (line 320)

Set is deleteable flag

  • access: public
Mage_Rule_Model_Rule setIsDeleteable (boolean $flag)
  • boolean $flag
setIsReadonly (line 343)

Set is readonly flag

  • access: public
Mage_Rule_Model_Rule setIsReadonly (boolean $value)
  • boolean $value
validate (line 228)
  • access: public
void validate ( $object)
  • Varien_Object $object
validateData (line 355)

Validates data for rule

  • return: - returns true if validation passed successfully. Array with error description otherwise
  • access: public
boolean|array validateData ( $object)
  • Varien_Object $object
_afterLoad (line 238)
  • access: protected
void _afterLoad ()

Redefinition of:
Mage_Core_Model_Abstract::_afterLoad()
Processing object after load data

Redefined in descendants as:
_beforeSave (line 266)

Prepare data before saving

  • access: protected
Mage_Rule_Model_Rule _beforeSave ()

Redefinition of:
Mage_Core_Model_Abstract::_beforeSave()
Processing object before save data
_construct (line 52)

Init resoirce

  • access: protected
unknown_type _construct ()

Redefined in descendants as:
_convertFlatToRecursive (line 166)
  • access: protected
void _convertFlatToRecursive ( $rule)
  • array $rule
_prepareWebsiteIds (line 296)

Combain website ids to string

  • access: protected
Mage_Rule_Model_Rule _prepareWebsiteIds ()
_resetActions (line 98)
  • access: public
void _resetActions ([ $actions = null])
  • $actions
_resetConditions (line 63)
  • access: public
void _resetConditions ([ $conditions = null])
  • $conditions

Inherited Methods

Inherited From Mage_Core_Model_Abstract

Mage_Core_Model_Abstract::afterCommitCallback()
Mage_Core_Model_Abstract::afterLoad()
Mage_Core_Model_Abstract::cleanModelCache()
Mage_Core_Model_Abstract::clearInstance()
Mage_Core_Model_Abstract::delete()
Mage_Core_Model_Abstract::getCacheIdTags()
Mage_Core_Model_Abstract::getCacheTags()
Mage_Core_Model_Abstract::getCollection()
Mage_Core_Model_Abstract::getEntityId()
Mage_Core_Model_Abstract::getId()
Mage_Core_Model_Abstract::getIdFieldName()
Mage_Core_Model_Abstract::getResource()
Mage_Core_Model_Abstract::getResourceCollection()
Mage_Core_Model_Abstract::getResourceName()
Mage_Core_Model_Abstract::isObjectNew()
Mage_Core_Model_Abstract::load()
Mage_Core_Model_Abstract::save()
Mage_Core_Model_Abstract::setId()
Mage_Core_Model_Abstract::_afterDelete()
Mage_Core_Model_Abstract::_afterDeleteCommit()
Mage_Core_Model_Abstract::_afterLoad()
Mage_Core_Model_Abstract::_afterSave()
Mage_Core_Model_Abstract::_afterSaveCommit()
Mage_Core_Model_Abstract::_beforeDelete()
Mage_Core_Model_Abstract::_beforeLoad()
Mage_Core_Model_Abstract::_beforeSave()
Mage_Core_Model_Abstract::_clearData()
Mage_Core_Model_Abstract::_clearReferences()
Mage_Core_Model_Abstract::_getEventData()
Mage_Core_Model_Abstract::_getResource()
Mage_Core_Model_Abstract::_hasModelChanged()
Mage_Core_Model_Abstract::_init()
Mage_Core_Model_Abstract::_protectFromNonAdmin()
Mage_Core_Model_Abstract::_setResourceModel()

Documentation generated on Fri, 11 Feb 2011 17:11:42 +0200 by phpDocumentor 1.4.3