Commit fd712d1
committed
bug #286 Fix crud controller template (Thibaut Salanon)
This PR was squashed before being merged into the 1.0-dev branch (closes #286).
Discussion
----------
Fix crud controller template
There is a mistake in crud controller template :
Example (`src/Resources/skeleton/crud/controller/Controller.tpl.php` - line 35) :
`return $this->render('<?= $route_name ?>/index.html.twig', ['<?= $entity_twig_var_plural ?>' => $<?= $entity_var_plural ?>]);`
With an entity with following path :` Entity/Foo/BarBar.php` , `$route_name` will be equal to `foo_bar_bar` and does not correspond with the `index.html.twig` path (should be `foo/bar_bar`).
This pull request fix this by adding the `$templatesPath` var, used to create twig templates, for the controller generation.
:)
Commits
-------
f77a843 Rename template_var with templates_path (plural)
86d24f3 Create new template_path var and replace route_name var in render method parameter in controller templateFile tree
2 files changed
+7
-7
lines changed- src
- Maker
- Resources/skeleton/crud/controller
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | | - | |
161 | | - | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments