Inheritance diagram for ModelBehavior:

Public Member Functions | |
| _addToWhitelist (&$model, $field) | |
| afterDelete (&$model) | |
| afterFind (&$model, $results, $primary) | |
| afterSave (&$model, $created) | |
| beforeDelete (&$model, $cascade=true) | |
| beforeFind (&$model, $query) | |
| beforeSave (&$model) | |
| beforeValidate (&$model) | |
| cleanup (&$model) | |
| dispatchMethod (&$model, $method, $params=array()) | |
| onError (&$model, $error) | |
| setup (&$model, $config=array()) | |
Public Attributes | |
| $mapMethods = array() | |
| $settings = array() | |
Definition at line 35 of file behavior.php.
| ModelBehavior::_addToWhitelist | ( | &$ | model, | |
| $ | field | |||
| ) |
If $model's whitelist property is non-empty, $field will be added to it. Note: this method should *only* be used in beforeValidate or beforeSave to ensure that it only modifies the whitelist for the current save operation. Also make sure you explicitly set the value of the field which you are allowing.
| object | $model Model using this behavior | |
| string | $field Field to be added to $model's whitelist protected |
Definition at line 186 of file behavior.php.
| ModelBehavior::afterDelete | ( | &$ | model | ) |
After delete callback
| object | $model Model using this behavior public |
Reimplemented in AclBehavior, and TranslateBehavior.
Definition at line 136 of file behavior.php.
| ModelBehavior::afterFind | ( | &$ | model, | |
| $ | results, | |||
| $ | primary | |||
| ) |
After find callback. Can be used to modify any results returned by find and findAll.
| object | $model Model using this behavior | |
| mixed | $results The results of the find operation | |
| boolean | $primary Whether this model is being queried directly (vs. being queried as an association) |
Reimplemented in ContainableBehavior, and TranslateBehavior.
Definition at line 96 of file behavior.php.
| ModelBehavior::afterSave | ( | &$ | model, | |
| $ | created | |||
| ) |
After save callback
| object | $model Model using this behavior | |
| boolean | $created True if this save created a new record public |
Reimplemented in AclBehavior, TranslateBehavior, and TreeBehavior.
Definition at line 120 of file behavior.php.
| ModelBehavior::beforeDelete | ( | &$ | model, | |
| $ | cascade = true | |||
| ) |
Before delete callback
| object | $model Model using this behavior | |
| boolean | $cascade If true records that depend on this record will also be deleted |
Definition at line 129 of file behavior.php.
| ModelBehavior::beforeFind | ( | &$ | model, | |
| $ | query | |||
| ) |
Before find callback
| object | $model Model using this behavior | |
| array | $queryData Data used to execute this query, i.e. conditions, order, etc. |
Reimplemented in ContainableBehavior, and TranslateBehavior.
Definition at line 86 of file behavior.php.
| ModelBehavior::beforeSave | ( | &$ | model | ) |
Before save callback
| object | $model Model using this behavior |
Reimplemented in TreeBehavior.
Definition at line 112 of file behavior.php.
Referenced by TranslateBehavior::afterSave(), and TranslateBehavior::beforeValidate().
| ModelBehavior::beforeValidate | ( | &$ | model | ) |
Before validate callback
| object | $model Model using this behavior |
Reimplemented in TranslateBehavior.
Definition at line 104 of file behavior.php.
| ModelBehavior::cleanup | ( | &$ | model | ) |
Clean up any initialization this behavior has done on a model. Called when a behavior is dynamically detached from a model using Model::detach().
| object | $model Model using this behavior public |
Reimplemented in TranslateBehavior.
Definition at line 73 of file behavior.php.
| ModelBehavior::dispatchMethod | ( | &$ | model, | |
| $ | method, | |||
| $ | params = array() | |||
| ) |
Overrides Object::dispatchMethod to account for PHP4's broken reference support
Definition at line 152 of file behavior.php.
| ModelBehavior::onError | ( | &$ | model, | |
| $ | error | |||
| ) |
DataSource error callback
| object | $model Model using this behavior | |
| string | $error Error generated in DataSource public |
Definition at line 144 of file behavior.php.
| ModelBehavior::setup | ( | &$ | model, | |
| $ | config = array() | |||
| ) |
Setup this behavior with the specified configuration settings.
| object | $model Model using this behavior | |
| array | $config Configuration settings for $model public |
Reimplemented in AclBehavior, ContainableBehavior, TranslateBehavior, and TreeBehavior.
Definition at line 64 of file behavior.php.
| ModelBehavior::$mapMethods = array() |
Definition at line 56 of file behavior.php.
| ModelBehavior::$settings = array() |
Definition at line 46 of file behavior.php.
Referenced by TreeBehavior::setup(), and ContainableBehavior::setup().
1.4.7