php - Stop callback propagation -


i have behavior update record instead of delete beforedelete callback.

public function beforedelete(model $model, $cascade = true) {     [...]      return true; } 

when return true, deletion proccess continues, instead of stop. wan't stop propagation of next event delete.

i have read stoppropagation() function of cakeevent don't know , how use correctly inside behavior. may help-me?

taken the cakephp core libraries page:

public function beforedelete(model $model, $cascade = true,$event) {     [...]      $event->stoppropogation(); } 

that should it.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -