X-Git-Url: https://git.rapsys.eu/packbundle/blobdiff_plain/85954eeea034b2904c5bc8bcfa710349702f02bf..22c6a9aae25e6f650086527456f0d3cdb6891970:/DependencyInjection/RapsysPackExtension.php?ds=sidebyside diff --git a/DependencyInjection/RapsysPackExtension.php b/DependencyInjection/RapsysPackExtension.php index 97bb11f..7d66000 100644 --- a/DependencyInjection/RapsysPackExtension.php +++ b/DependencyInjection/RapsysPackExtension.php @@ -24,6 +24,11 @@ class RapsysPackExtension extends Extension { //Load configuration $configuration = $this->getConfiguration($configs, $container); $config = $this->processConfiguration($configuration, $configs); + + //Set default config in parameter + if (!$container->hasParameter($alias = $this->getAlias())) { + $container->setParameter($alias, $config[$alias]); + } } /** @@ -33,4 +38,11 @@ class RapsysPackExtension extends Extension { //Get configuration instance with resolved web path return new Configuration($container->getParameter('kernel.project_dir').'/web/'); } + + /** + * {@inheritdoc} + */ + public function getAlias() { + return 'rapsys_pack'; + } }