What are Hooks in CakePHP?

by graciela.bogisich , in category: Technology , 3 years ago

What are Hooks in CakePHP?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by weston_dietrich , 3 years 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.

Related Threads:

What is CakePHP?
What is a Helper in CakePHP?
What is MVC in CakePHP?
What are the different log levels in CakePHP?
How we can use Cache in CakePHP?
How to write a Cache Object in CakePHP?