From 01f89f8c3e9c7b567320d8fe61f6a182e7fca467 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 30 Nov 2013 22:38:33 -0500 Subject: [PATCH] Add docs for events. --- Cake/ORM/Table.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Cake/ORM/Table.php b/Cake/ORM/Table.php index 33e256ec661..d199749ff4a 100644 --- a/Cake/ORM/Table.php +++ b/Cake/ORM/Table.php @@ -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. */