1
1
<?php
2
2
3
+ /*
4
+ * This file is part of the Symfony MakerBundle package.
5
+ *
6
+ * (c) Fabien Potencier <[email protected] >
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
3
12
namespace Symfony \Bundle \MakerBundle \Maker ;
4
13
5
14
use Doctrine \Common \Inflector \Inflector ;
6
15
use Doctrine \ORM \EntityManager ;
7
- use Doctrine \ORM \Mapping \ClassMetadataInfo ;
8
16
use Psr \Container \ContainerInterface ;
9
17
use Sensio \Bundle \FrameworkExtraBundle \Configuration \Route ;
10
18
use Symfony \Bundle \MakerBundle \ConsoleStyle ;
@@ -81,7 +89,7 @@ public function getParameters(InputInterface $input): array
81
89
82
90
$ helper = new GeneratorHelper ();
83
91
84
- return array (
92
+ return [
85
93
'helper ' => $ helper ,
86
94
'controller_class_name ' => $ controllerClassName ,
87
95
'entity_var_plural ' => lcfirst (Inflector::pluralize ($ entityClassName )),
@@ -93,15 +101,15 @@ public function getParameters(InputInterface $input): array
93
101
'route_path ' => Str::asRoutePath (str_replace ('Controller ' , '' , $ controllerClassName )),
94
102
'route_name ' => Str::asRouteName (str_replace ('Controller ' , '' , $ controllerClassName )),
95
103
'base_layout_exists ' => $ baseLayoutExists ,
96
- ) ;
104
+ ] ;
97
105
}
98
106
99
107
/**
100
108
* {@inheritdoc}
101
109
*/
102
110
public function getFiles (array $ params ): array
103
111
{
104
- return array (
112
+ return [
105
113
__DIR__ .'/../Resources/skeleton/crud/controller/Controller.tpl.php ' => 'src/Controller/ ' .$ params ['controller_class_name ' ].'.php ' ,
106
114
// __DIR__.'/../Resources/skeleton/crud/form/Type.tpl.php' => 'src/Form/'.$params['form_class_name'].'.php',
107
115
__DIR__ .'/../Resources/skeleton/crud/templates/_delete_form.tpl.php ' => 'templates/ ' .$ params ['route_name ' ].'/_delete_form.html.twig ' ,
@@ -110,7 +118,7 @@ public function getFiles(array $params): array
110
118
__DIR__ .'/../Resources/skeleton/crud/templates/show.tpl.php ' => 'templates/ ' .$ params ['route_name ' ].'/show.html.twig ' ,
111
119
__DIR__ .'/../Resources/skeleton/crud/templates/new.tpl.php ' => 'templates/ ' .$ params ['route_name ' ].'/new.html.twig ' ,
112
120
__DIR__ .'/../Resources/skeleton/crud/templates/edit.tpl.php ' => 'templates/ ' .$ params ['route_name ' ].'/edit.html.twig ' ,
113
- ) ;
121
+ ] ;
114
122
}
115
123
116
124
public function writeSuccessMessage (array $ params , ConsoleStyle $ io )
0 commit comments