Browse Source

Revert "[FrameworkBundle] Updated the files generated by init:bundle to use the new bundle logical names"

This reverts commit d0e2b5b6113e2540d91e6b281b46aec7700c6813.
Fabien Potencier 14 years ago
parent
commit
49a7f525b9

+ 2 - 3
src/Symfony/Bundle/FrameworkBundle/Command/InitBundleCommand.php

@@ -107,9 +107,8 @@ EOT
         $filesystem->mirror(__DIR__.'/../Resources/skeleton/bundle/'.$input->getOption('format'), $targetDir);
 
         Mustache::renderDir($targetDir, array(
-            'namespace'   => $namespace,
-            'bundle'      => $bundle,
-            'bundleShort' => preg_replace('/Bundle$/', '', $bundle),
+            'namespace' => $namespace,
+            'bundle'    => $bundle,
         ));
 
         rename($targetDir.'/Bundle.php', $targetDir.'/'.$bundle.'.php');

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/generic/Controller/DefaultController.php

@@ -8,6 +8,6 @@ class DefaultController extends Controller
 {
     public function indexAction()
     {
-        return $this->render('{{ bundleShort }}:Default:index.html.twig');
+        return $this->render('{{ bundle }}:Default:index.html.twig');
     }
 }

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/php/Resources/config/routing.php

@@ -6,7 +6,7 @@ use Symfony\Component\Routing\Route;
 $collection = new RouteCollection();
 /*
 $collection->add('homepage', new Route('/', array(
-    '_controller' => '{{ bundleShort }}:Default:index',
+    '_controller' => '{{ bundle }}:Default:index',
 )));
 */
 return $collection;

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/xml/Resources/config/routing.xml

@@ -6,7 +6,7 @@
 
     <!--
     <route id="homepage" pattern="/">
-        <default key="_controller">{{ bundleShort }}:Default:index</default>
+        <default key="_controller">{{ bundle }}:Default:denied</default>
     </route>
     //-->
 </routes>

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/skeleton/bundle/yml/Resources/config/routing.yml

@@ -1,3 +1,3 @@
 #homepage:
 #    pattern:  /
-#    defaults: { _controller: {{ bundleShort }}:Default:index }
+#    defaults: { _controller: {{ bundle }}:Default:index }