I was looking into drupal 8 changes.. where i found the hook_init() no longer exists, since, after introducing the Symfony kernel and events it was not serving any specific need.. As i'm new to drupal development https://www.drupal.org/node/2013014 couldn't fill my doubt.. Can anyone give simple example to implement hook_init() in drupal 8
Thanks in advance :)

Comments

joshi.rohit100’s picture

Drupal 8 bootsratpping is now event-based. So If you want to do something on hook_init(), then you have to do that on the REQUEST event as mentioned in https://www.drupal.org/node/2013014.

slewazimuth’s picture

drupal.dinesh’s picture

The article was really cool n great :)