Skip to main content
1 of 2

I have found why it was not working. I was looking in the user interface whether my tokens showed up in the list with tokens a user can use. But they did not. After digging all the core code I found out that I had to use a combination of hook_tokens and an event listener for evaluate tokens.

I also had to put a require once statement to my token listener class in top of my module file otherwise it would fail with loading the file.