]> Raphaƫl G. Git Repositories - packbundle/blobdiff - DependencyInjection/RapsysPackExtension.php
Remove config key
[packbundle] / DependencyInjection / RapsysPackExtension.php
index 5bf30085f86d8137382d80a1d16946ff9cd43462..2bc7f67209d914171413ae505c3ad9b75057f543 100644 (file)
@@ -14,6 +14,8 @@ namespace Rapsys\PackBundle\DependencyInjection;
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Extension\Extension;
 
 use Symfony\Component\DependencyInjection\ContainerBuilder;
 use Symfony\Component\DependencyInjection\Extension\Extension;
 
+use Rapsys\PackBundle\RapsysPackBundle;
+
 /**
  * This is the class that loads and manages your bundle configuration.
  *
 /**
  * This is the class that loads and manages your bundle configuration.
  *
@@ -35,17 +37,20 @@ class RapsysPackExtension extends Extension {
                //Detect when no user configuration is provided
                if ($configs === [[]]) {
                        //Prepend default config
                //Detect when no user configuration is provided
                if ($configs === [[]]) {
                        //Prepend default config
-                       $container->prependExtensionConfig($this->getAlias(), $config);
+                       $container->prependExtensionConfig(self::getAlias(), $config);
                }
 
                //Save configuration in parameters
                }
 
                //Save configuration in parameters
-               $container->setParameter($this->getAlias(), $config);
+               $container->setParameter(self::getAlias(), $config);
+
+               //Set rapsys_pack.path key
+               $container->setParameter(self::getAlias().'.path', $config['path']);
        }
 
        /**
         * {@inheritdoc}
         */
        public function getAlias(): string {
        }
 
        /**
         * {@inheritdoc}
         */
        public function getAlias(): string {
-               return 'rapsys_pack';
+               return RapsysPackBundle::getAlias();
        }
 }
        }
 }