initializeSystem

The initializeSystem hook is triggered right after the system initialization process is finished and before the request processing is started.

Example

// src/EventListener/InitializeSystemListener.php
namespace App\EventListener;

use Contao\CoreBundle\ServiceAnnotation\Hook;
use Terminal42\ServiceAnnotationBundle\ServiceAnnotationInterface;

class InitializeSystemListener implements ServiceAnnotationInterface
{
    /**
     * @Hook("initializeSystem")
     */
    public function onInitializeSystem(): void
    {
        // Do something …
    }
}

References