pug-php/pug-symfony

View on GitHub
src/Pug/PugSymfonyBundle/PugSymfonyBundle.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Pug\PugSymfonyBundle;

use Pug\PugSymfonyBundle\Command\AssetsPublishCommand;
use Pug\Symfony\Traits\PrivatePropertyAccessor;
use Symfony\Component\Console\Application;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class PugSymfonyBundle extends Bundle
{
    use PrivatePropertyAccessor;

    public function build(ContainerBuilder $containerBuilder): void
    {
        $extension = new PugExtension();
        $containerBuilder->registerExtension($extension);
        $containerBuilder->loadFromExtension($extension->getAlias());
    }

    public function registerCommands(Application $application)
    {
        $application->addCommands([
            $this->container->get(AssetsPublishCommand::class),
        ]);
    }
}