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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -