<?php
declare(strict_types=1);
namespace Hitso\Bundle\CatalogBundle;
use Hitso\Bundle\CatalogBundle\DependencyInjection\ConfigExtensions\CategorySectionExtension;
use Hitso\Bundle\CatalogBundle\DependencyInjection\ConfigExtensions\ProductSectionExtension;
use Hitso\Bundle\CatalogBundle\DependencyInjection\HitsoCatalogExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class HitsoCatalogBundle
*
* @package Hitso\Bundle\CatalogBundle
*/
class HitsoCatalogBundle extends Bundle
{
/**
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container): void
{
parent::build($container);
if ($container->hasExtension('hitso_section')) {
/** @var $extension HitsoCatalogExtension */
$extension = $container->getExtension('hitso_section');
$extension->addConfigExtension(new ProductSectionExtension());
$extension->addConfigExtension(new CategorySectionExtension());
}
}
}