]> Raphaƫl G. Git Repositories - userbundle/blobdiff - DependencyInjection/RapsysUserExtension.php
Version 0.5.0
[userbundle] / DependencyInjection / RapsysUserExtension.php
index a0f731590f3dc5f230627d92f04243622ba976bd..5f92c1072bb2fad000e12e4ee9b12b9f4790deed 100644 (file)
@@ -32,18 +32,29 @@ class RapsysUserExtension extends Extension {
                //Process the configuration to get merged config
                $config = $this->processConfiguration($configuration, $configs);
 
                //Process the configuration to get merged config
                $config = $this->processConfiguration($configuration, $configs);
 
+               //Set bundle alias
+               $alias = RapsysUserBundle::getAlias();
+
                //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(self::getAlias(), $config);
+                       $container->prependExtensionConfig($alias, $config);
                }
 
                //Save configuration in parameters
                }
 
                //Save configuration in parameters
-               $container->setParameter(self::getAlias(), $config);
+               $container->setParameter($alias, $config);
+
+               //Set rapsysuser.alias key
+               $container->setParameter($alias.'.alias', $alias);
+
+               //Set rapsysuser.version key
+               $container->setParameter($alias.'.version', RapsysUserBundle::getVersion());
        }
 
        /**
         * {@inheritdoc}
        }
 
        /**
         * {@inheritdoc}
+        *
+        * @xxx Required by kernel to load renamed alias configuration
         */
        public function getAlias(): string {
                return RapsysUserBundle::getAlias();
         */
        public function getAlias(): string {
                return RapsysUserBundle::getAlias();