-
-
Save kmadejski/0786780fadf47afcabf459406a8371a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace EzSystems\TestBundle\DependencyInjection; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\Config\FileLocator; | |
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | |
use Symfony\Component\DependencyInjection\Loader; | |
use eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor; | |
class EzSystemsTestExtension extends Extension | |
{ | |
const BUNDLE_ALIAS = 'ez_systems_test'; | |
/** | |
* {@inheritdoc} | |
*/ | |
public function load(array $configs, ContainerBuilder $container) | |
{ | |
$configuration = new Configuration(); | |
$config = $this->processConfiguration($configuration, $configs); | |
$processor = new ConfigurationProcessor($container, 'ez_systems_test'); | |
$processor->mapSetting('other_setting', $config); | |
$processor->mapSetting('include_content_types', $config); | |
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
$loader->load('services.yml'); | |
} | |
public function getAlias() | |
{ | |
return self::BUNDLE_ALIAS; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment