What are Hooks in CakePHP?



by graciela.bogisich, in category: Technology , 8 months ago

What are Hooks in CakePHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by weston_dietrich , 8 months ago

CakePHP hooks are callback functions that are called before or after a model operation and defined in models.

List of some Hooks functions provided by CakePHP.

  1. beforeFind
  2. afterFind
  3. beforeValidate
  4. afterValidate
  5. beforeSave
  6. afterSave
  7. beforeDelete
  8. afterDelete
  9. onError

You can find top rated CakePHP books here.