I am thinking of attempting my first behavior but could not find much help
with my questions I need answered in the cookbook or online so here goes.
Example:
Model Post
var $actsAs = array(
'Orderable' => array(
'identified' => 'user_id'));
I need to hook into a delete callback so model Post delete record then the
Orderable behavior kicks in and does something but do I need to manually
call the behavior in model after delete?
And how do I pass data to the behavior? User deletes a Post belong to
himself how do I access the User or Post data or pass it to the behavior?
We User.id 159 deletes Post.id 258 how can I use 159 and 258 in the
behavior?
If you know good link to point out that would be great.
function delete($id) {
//bare bones forget valid user who can delete this is for testing only
$this->Post->delete($id);
}
Thanks
K
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php