Skip to content

Commit 01f89f8

Browse files
committed
Add docs for events.
1 parent f669d8c commit 01f89f8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Cake/ORM/Table.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,19 @@
5353
* Table objects provide a few callbacks/events you can hook into to augment/replace
5454
* find operations. Each event uses the standard event subsystem in CakePHP
5555
*
56-
* - beforeFind($event, $query, $options) - Fired before each find operation. By stopping
56+
* - `beforeFind($event, $query, $options)` - Fired before each find operation. By stopping
5757
* the event and supplying a return value you can bypass the find operation entirely. Any
5858
* changes done to the $query instance will be retained for the rest of the find.
59+
* - `beforeValidate($event, $entity, $options, $validator)` - Fired before an entity is validated.
60+
* By stopping this event, you can abort the validate + save operations.
61+
* - `afterValidate($event, $entity, $options, $validator)` - Fired after an entity is validated.
62+
* - `beforeSave($event, $entity, $options)` - Fired before each entity is saved. Stopping this
63+
* event will abort the save operation. When the event is stopped the result of the event will
64+
* be returned.
65+
* - `afterSave($event, $entity, $options)` - Fired after an entity is saved.
66+
* - `beforeDelete($event, $entity, $options)` - Fired before an entity is deleted.
67+
* By stopping this event you will abort the delete operation.
68+
* - `afterDelete($event, $entity, $options)` - Fired after an entity has been deleted.
5969
*
6070
* @see Cake\Event\EventManager for reference on the events system.
6171
*/

0 commit comments

Comments
 (0)