How to set up a token (using addTokenSection) on config.php services? into a email builder?

Hey, everyone, I’m trying to add a token into the email builder list tokens; using addTokenSection() function, but I can’t set up the services on config.php
as far as I read and understand this is the basic set up to array the eventlistener to use
call ‘getSubscribedEvents()’ from config.php, do am I missing anything on the set up?

‘services’ => array(
‘events’ => array(
‘plugin.helloworld.emailbundle.subscriber’ => array(
‘class’ => ‘MauticPlugin\HelloWorldBundle\EventListener\EmailSubscriber’

as much as I understand I need at least this structure min
do I am wrong?


  • Config/
    • config.php
  • HelloWorldBundle.php
  • EventListener
    • EmailSubscriber.php
  • Tranlations
    • en_US
      • messages.ini
  • Views
    • SubscriberEvents
      • TokenEmail
        • token.html.php

Well, Idk how community works, but no one answer any question lol