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
Post a Comment