⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

I want to call "callback_before_insert & callback_before_update" twice in same function



nitin
  • profile picture
  • Member

Posted 31 January 2017 - 11:25 AM

I want to call "callback_before_insert & callback_before_update" twice in same function.

 

$crud->callback_before_insert(array($this, 'encrypt_password_callback'));
$crud->callback_before_update(array($this, 'encrypt_password_callback'));
 
$crud->callback_before_insert(array($this, 'created_date'));
$crud->callback_before_update(array($this, 'created_date'));
 
 
Its not working, how can i make it work?

 

 


Amit Shah
  • profile picture
  • Member

Posted 01 February 2017 - 06:17 AM

Well - i understand GC have a single function call.. what you can do is - possibly alter the code of the library to cater your requirement. But if not, what i can suggest is - make a call 2 single function.. and if u want to call another function, call the same from within the called back function.

 

Happy GCing :)