Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 93358dc

Browse files
author
Hakier
committed
Update the_router.rst
1 parent 2258208 commit 93358dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

quick_tour/the_router.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ Now you can add a new ``Route`` to the tree using Doctrine::
161161
{
162162
public function getOrder()
163163
{
164-
// refers to the order in which the class' load function is called
165-
// (lower return values are called first)
166-
// used value 20, because LoadPageData::getOrder returns 10 and LoadDemoData no implements OrderedFixtureInterface so will be called before it, otherwise will occur RuntimeException("Controller "Symfony\Cmf\Bundle\ContentBundle\Controller\ContentController::indexAction()" requires that you provide a value for the "$contentDocument" argument (because there is no default value or because there is a non optional argument after this one).") because '/cms/simple/quick_tour' will no exist yet
167164
return 20;
168165
}
169166
@@ -193,6 +190,8 @@ Now you can add a new ``Route`` to the tree using Doctrine::
193190
$documentManager->flush(); // save it
194191
}
195192
}
193+
194+
Above we implemented the ``OrderedFixtureInterface`` so that our routes were loaded in the correct sequence relative to other fixtures.
196195

197196
This creates a new node called ``/cms/routes/new-route``, which will display
198197
our ``quick_tour`` page when you go to ``/new-route``.

0 commit comments

Comments
 (0)