Hi All ,
For Every Drupal Developer initially get strucked with the concept of drupal is Hooks.
It is the major driven approach in the old versions of drupal but hooks are there in drupal 8 too .
Inorder to describe about hook i dont want to explain with simple statements or definitions.
I assume that below points will make you clear in the concept of hooks in drupal 8.
1. Hooks occur at various points in the thread of execution, where Drupal seeks contributions from all the enabled modules.
2.A hook can be thought of as an event listener in the sense that an event triggers an action. The event in Drupal, such as deleting a node, would trigger the hook "hook_delete".
3.One way for modules to alter the core behavior of Drupal (or another module) is to use hooks. Hooks are specially-named functions that a module defines (this is known as "implementing the hook"), which are discovered and called at specific times to alter or add to the base behavior or data
4.Hooks are documented in *.api.php files
5.Core Library also define the Hooks same as modules
6.Best Tutorial About Hook system in Drupal http://alanstorm.com/drupal_module_hooks/
7.Hooks are an implementation of the Mediator pattern
Comments