Drupal, Technology

How to Use Hook_init in Drupal 8?

In Drupal 8, most of the Hooks such as hook_init, hook_boot are removed from the Drupal 8. These Hooks are replaced with Event Subscriber in Drupal 8. If you are performing few actions such as redirect, add CSS, add JS or any other modification on request, it can be done by registering Event Subscriber. As we know Drupal 8 introduces...

by Jeet Lal
Tag: hook_boot