Skip to content

Commit

Permalink
Add docs for events.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 1, 2013
1 parent f669d8c commit 01f89f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Cake/ORM/Table.php
Expand Up @@ -53,9 +53,19 @@
* Table objects provide a few callbacks/events you can hook into to augment/replace
* find operations. Each event uses the standard event subsystem in CakePHP
*
* - beforeFind($event, $query, $options) - Fired before each find operation. By stopping
* - `beforeFind($event, $query, $options)` - Fired before each find operation. By stopping
* the event and supplying a return value you can bypass the find operation entirely. Any
* changes done to the $query instance will be retained for the rest of the find.
* - `beforeValidate($event, $entity, $options, $validator)` - Fired before an entity is validated.
* By stopping this event, you can abort the validate + save operations.
* - `afterValidate($event, $entity, $options, $validator)` - Fired after an entity is validated.
* - `beforeSave($event, $entity, $options)` - Fired before each entity is saved. Stopping this
* event will abort the save operation. When the event is stopped the result of the event will
* be returned.
* - `afterSave($event, $entity, $options)` - Fired after an entity is saved.
* - `beforeDelete($event, $entity, $options)` - Fired before an entity is deleted.
* By stopping this event you will abort the delete operation.
* - `afterDelete($event, $entity, $options)` - Fired after an entity has been deleted.
*
* @see Cake\Event\EventManager for reference on the events system.
*/
Expand Down

0 comments on commit 01f89f8

Please sign in to comment.