Events and Hooks

The sys­tem Craft uses to allow plu­g­ins and mod­ules to mod­i­fy or extend core func­tion­al­i­ty by hook­ing into” spe­cif­ic points in the appli­ca­tion lifecycle.

Events are used to run your own code at spe­cif­ic points in the Craft CMS appli­ca­tion life­cy­cle, so you can mod­i­fy data or behav­ior. This is a very com­mon way to extend and cus­tomize parts of Craft’s native func­tion­al­i­ty and takes place in a Craft plu­g­in or module.

Hooks, on the oth­er hand, are used via tem­plates to alter the out­put of a template.

Read more about hooks and events