Sort of get config to work
This commit is contained in:
@@ -4,16 +4,21 @@ declare(strict_types=1);
|
||||
|
||||
namespace Pcm\IconBundle;
|
||||
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Pcm\IconBundle\DependencyInjection\PcmIconExtension;
|
||||
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
|
||||
|
||||
class PcmIconBundle extends AbstractBundle {
|
||||
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): void
|
||||
class PcmIconBundle extends AbstractBundle
|
||||
{
|
||||
public function getContainerExtension(): ?ExtensionInterface
|
||||
{
|
||||
$loader = new YamlFileLoader($builder, new FileLocator(__DIR__.'/../config/'));
|
||||
$loader->load('services.yml');
|
||||
if (null === $this->extension) {
|
||||
$this->extension = new PcmIconExtension();
|
||||
}
|
||||
|
||||
return $this->extension;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user