Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf470441

Browse files
committed
Merge pull requestsymfony#2705 from WouterJ/issue_2703
Updated doc for the new way to render partials
2 parentse02e64b +5f8b834 commitf470441

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎cookbook/templating/PHP.rst‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ below renders the ``index.html.php`` template::
5252
// src/Acme/HelloBundle/Controller/HelloController.php
5353

5454
// ...
55-
5655
public function indexAction($name)
5756
{
5857
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
226225
..code-block::html+php
227226

228227
<!-- 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-
)) ?>
228+
<?php echo $view['actions']->render(
229+
new ControllerReference('AcmeHelloBundle:Hello:fancy', array(
230+
'name' => $name,
231+
'color' => 'green',
232+
))
233+
) ?>
233234

234235
Here, the ``AcmeHelloBundle:Hello:fancy`` string refers to the ``fancy`` action of the
235236
``Hello`` controller::

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp