Skip to content

Commit e762191

Browse files
mimol91Adam Szaraniec
authored and
Adam Szaraniec
committed
Update controller syntax for bundle-less applications
1 parent 2c34fcb commit e762191

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

templating/embedding_controllers.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ The ``recent_list`` template is perfectly straightforward:
6767
(e.g. ``/article/*slug*``). This is a bad practice. In the next section,
6868
you'll learn how to do this correctly.
6969

70-
To include the controller, you'll need to refer to it using the standard
71-
string syntax for controllers (i.e. **bundle**:**controller**:**action**):
70+
To include the controller, you'll need to refer to it using the standard string syntax for controllers (i.e. **controllerPath**::**action**).
7271

7372
.. configuration-block::
7473

@@ -79,7 +78,7 @@ string syntax for controllers (i.e. **bundle**:**controller**:**action**):
7978
{# ... #}
8079
<div id="sidebar">
8180
{{ render(controller(
82-
'AppBundle:Article:recentArticles',
81+
'App\\Controller\\ArticleController::recentArticles',
8382
{ 'max': 3 }
8483
)) }}
8584
</div>
@@ -92,7 +91,7 @@ string syntax for controllers (i.e. **bundle**:**controller**:**action**):
9291
<div id="sidebar">
9392
<?php echo $view['actions']->render(
9493
new \Symfony\Component\HttpKernel\Controller\ControllerReference(
95-
'AppBundle:Article:recentArticles',
94+
'App\\Controller\\ArticleController::recentArticles',
9695
array('max' => 3)
9796
)
9897
) ?>

0 commit comments

Comments
 (0)