DependencyInjection/Compiler/GlobalVariablesCompilerPass.php
public function process(ContainerBuilder $container)
    {
        $configs = $container->getExtensionConfig('skillberto_sonata_page_menu');
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);
        
        $container->getDefinition('twig')
            ->addMethodCall('addGlobal', ['sonata_page_menu', $config]);
    }
public function process(ContainerBuilder $container)
    {
        $configs = $container->getExtensionConfig('skillberto_sonata_page_menu');
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);
        
        $container->getDefinition('twig')
            ->addMethodCall('addGlobal', ['sonata_page_menu', $config]);
    }
{@inheritdoc}