We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent954a9ef commit5f8b834Copy full SHA for 5f8b834
cookbook/templating/PHP.rst
@@ -52,7 +52,6 @@ below renders the ``index.html.php`` template::
52
// src/Acme/HelloBundle/Controller/HelloController.php
53
54
// ...
55
-
56
public function indexAction($name)
57
{
58
return $this->render('AcmeHelloBundle:Hello:index.html.php', array('name' => $name));
@@ -226,10 +225,12 @@ If you create a ``fancy`` action, and want to include it into the
226
225
..code-block::html+php
227
228
<!-- src/Acme/HelloBundle/Resources/views/Hello/index.html.php -->
229
- <?php echo $view['actions']->render('AcmeHelloBundle:Hello:fancy', array(
230
- 'name' => $name,
231
- 'color' => 'green'
232
- )) ?>
+ <?php echo $view['actions']->render(
+ new ControllerReference('AcmeHelloBundle:Hello:fancy', array(
+ 'name' => $name,
+ 'color' => 'green',
+ ))
233
+ ) ?>
234
235
Here, the ``AcmeHelloBundle:Hello:fancy`` string refers to the ``fancy`` action of the
236
``Hello`` controller::