SitemapCompilerPass example

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class SitemapBundle extends Bundle
{
    public function build(ContainerBuilder $container): void
    {
        parent::build($container);

        $container->addCompilerPass(new SitemapCompilerPass());

        $loader = new XmlFileLoader($containernew FileLocator(__DIR__ . '/DependencyInjection'));
        $loader->load('services.xml');
    }
}
Home | Imprint | This part of the site doesn't use cookies.