- Drupal basic knowledge
- Drupal hooks basic knowledge
Drupal 8 comes with two extension points for module developers to allow other modules to interact with their code.
The trusty alter hook, the linchpin of Drupal versions past is still there - allowing other modules to interact and intervene in the behaviour of your module.
But there is a new kid on the block, the event system.So as a module developer how do you decide whether to use the alter system or the event system.
We will discuss:
- Pros of Events
- Pros of hooks
- To alter or to fire an event?
- Code sample for hooks
- Code sample for events