@@ -18,7 +18,7 @@ Configuration
18
18
19
19
**prototype **: ``array `` **default **: ``{ router.default: 100 } ``
20
20
21
- This defines the routers to use in the chain. By default, only the Symfony2
21
+ This defines the routers to use in the chain. By default, only the Symfony
22
22
router is used. The key is the name of the service and the value is the
23
23
priority. The chain is sorted from the highest to the lowest priority.
24
24
@@ -72,9 +72,9 @@ To add the ``DynamicRouter``, use the following configuration:
72
72
73
73
**type **: ``Boolean `` **default **: ``true ``
74
74
75
- If this option is set to ``false ``, the default Symfony2 router will *not * be
75
+ If this option is set to ``false ``, the default Symfony router will *not * be
76
76
overridden by the ``ChainRouter ``. By default, the ``ChainRouter `` will
77
- override the default Symfony2 router, but it will pass all requests to the
77
+ override the default Symfony router, but it will pass all requests to the
78
78
default router, because :ref: `no other routers were set <reference-config-routing-chain_routers >`.
79
79
80
80
@@ -142,10 +142,9 @@ defaults to ``cmf_content.controller:indexAction``.
142
142
143
143
**type **: ``string `` **default **: value of ``generic_controller ``
144
144
145
- The default controller to use if none of the enhancers found a controller. The
146
- value is the name of a controller using either the
147
- ``AppBundle::Page::index `` or ``app.page_controller:indexAction ``
148
- notation.
145
+ The default controller to use if none of the enhancers found a controller.
146
+ Accepts any valid Symfony controller reference.
147
+
149
148
150
149
``controllers_by_type ``
151
150
.......................
@@ -203,7 +202,7 @@ This object is checked for being ``instanceof`` the class names in this map.
203
202
other extending classes. The order in which the classes are specified, matters.
204
203
The first match is taken.
205
204
206
- If matched, the controller will be set as ``_controller ``, making Symfony2
205
+ If matched, the controller will be set as ``_controller ``, making Symfony
207
206
choose this controller to handle the request.
208
207
209
208
.. configuration-block ::
@@ -307,10 +306,10 @@ setting is set as controller.
307
306
308
307
**type **: ``scalar ``, **default **: ``0 ``
309
308
310
- If this value is set to a number bigger than 0, the routes from the database
311
- are returned in the `` getRouteCollection `` . The limit serves to prevent huge
312
- route lists if you have a large database. Setting the limit to `` false ``
313
- disables the limit entirely.
309
+ If this value is set to a number bigger than 0, the `` getRouteCollection ``
310
+ method returns a collection of routes read from the database . The limit serves
311
+ to prevent huge route lists if you have a large database. Setting the limit to
312
+ `` false `` disables the limit entirely and attempts to return all routes .
314
313
315
314
``persistence ``
316
315
...............
@@ -334,9 +333,6 @@ disables the limit entirely.
334
333
route_basepaths :
335
334
- /cms/routes
336
335
- /cms/simple
337
- content_basepath : /cms/content
338
- admin_basepath : /cms/routes
339
- use_sonata_admin : auto
340
336
enable_initializer : true
341
337
342
338
.. code-block :: xml
@@ -350,9 +346,6 @@ disables the limit entirely.
350
346
<phpcr
351
347
enabled =" false"
352
348
manager-name =" null"
353
- content-basepath =" /cms/content"
354
- admin-basepath =" /cms/routes"
355
- use-sonata-admin =" auto"
356
349
enable_initializer =" true"
357
350
>
358
351
<route-basepath >/cms/routes</route-basepath >
@@ -376,9 +369,6 @@ disables the limit entirely.
376
369
'/cms/routes',
377
370
'/cms/simple',
378
371
],
379
- 'content_basepath' => '/cms/content',
380
- 'admin_basepath' => '/cms/routes',
381
- 'use_sonata_admin' => 'auto',
382
372
'enable_initializer' => true,
383
373
],
384
374
],
@@ -407,46 +397,7 @@ manager_name
407
397
A set of paths where routes are located in the PHPCR tree.
408
398
409
399
If the :doc: `CoreBundle <../core/introduction >` is registered, this will
410
- default to ``%cmf_core.persistence.phpcr.basepath%/routes ``. If the
411
- :doc: `SimpleCmsBundle <../simple_cms/introduction >` is registered as well,
412
- the SimpleCmsBundle basepath will be added as an additional route basepath.
413
-
414
- ``content_basepath ``
415
- ********************
416
-
417
- **type **: ``string `` **default **: ``/cms/content ``
418
-
419
- The basepath for content objects in the PHPCR tree. This information is used
420
- with the sonata admin to offer the correct subtree to select content documents.
421
-
422
- If the :doc: `CoreBundle <../core/introduction >` is registered, this will default to
423
- ``%cmf_core.persistence.phpcr.basepath%/content ``.
424
-
425
- ``admin_basepath ``
426
- ******************
427
-
428
- **type **: ``string `` **default **: first value of ``route_basepaths ``
429
-
430
- The path at which to create routes with Sonata admin. There can be additional
431
- route basepaths, but you will need your own tools to edit those.
432
-
433
- ``use_sonata_admin ``
434
- ********************
435
-
436
- **type **: ``enum `` **valid values **: ``true|false|auto `` **default **: ``auto ``
437
-
438
- If ``true ``, the admin classes for the routing are loaded and available for
439
- sonata. If set to ``auto ``, the admin services are activated only if the
440
- SonataPhpcrAdminBundle is present.
441
-
442
- .. note ::
443
-
444
- To see the route administration on the sonata dashboard, you still need to
445
- configure it to show the items ``cmf_routing.route_admin `` and
446
- ``cmf_routing.redirect_route_admin ``.
447
-
448
- If the :doc: `CoreBundle <../core/introduction >` is registered, this will
449
- default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin ``.
400
+ default to ``%cmf_core.persistence.phpcr.basepath%/routes ``.
450
401
451
402
``enable_initializer ``
452
403
**********************
@@ -456,18 +407,12 @@ default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``.
456
407
.. versionadded :: 1.3
457
408
This configuration option was introduced in RoutingBundle 1.3.
458
409
459
- The bundle comes with an initializer that creates the nodes for the ``admin_basepath ``
460
- automatically when initializing the repository or loading fixtures. Sometimes this
461
- is not what you want, as the created node is of type 'Generic' and sometimes this
462
- already needs to be a route (for the homepage). Set this to false to disable the
463
- initializer when you create your nodes your self (e.g. using Alice _).
464
-
465
- .. caution ::
466
-
467
- Initializers are forced to be disabled when Sonata Admin is not enabled.
468
- In such cases, you might have multiple route basepaths which are created
469
- by other sources. If the route basepath isn't created by another source,
470
- you have to configure an :ref: `initializer <phpcr-odm-repository-initializers >`.
410
+ The bundle comes with an initializer that creates the necessary nodes for all
411
+ ``route_basepaths `` roots to exist automatically when initializing the
412
+ repository or loading fixtures. Sometimes this is not what you want, as the
413
+ created node is of type 'Generic' and you might want the document to be a route
414
+ (for the homepage). Set this to false to disable the initializer when you
415
+ create your nodes yourself in your own :ref: `initializer <phpcr-odm-repository-initializers >`.
471
416
472
417
``orm ``
473
418
"""""""
@@ -564,14 +509,15 @@ priority.
564
509
565
510
**type **: ``scalar `` **default **: ``null ``
566
511
567
- To use a content repository when creating URLs, this option can be set to the
568
- content repository service.
512
+ One way for routes to specify content is by specifying the content ID. The
513
+ responsible route enhancer asks the content repository specified here for the
514
+ content. The repository has to implement ``Symfony\Cmf\Component\Routing\ContentRepositoryInterface ``.
569
515
570
516
.. note ::
571
517
572
- If PHPCR is enabled, it'll automatically use the phpcr content repository.
573
- This can be overridden by this option . ORM doesn't have a content
574
- repository at the moment.
518
+ If PHPCR is enabled, this setting will default to a generic PHPCR content
519
+ repository that tries to use the content ID as PHPCR path . ORM doesn't have
520
+ a content repository at the moment.
575
521
576
522
.. _reference-config-routing-locales :
577
523
@@ -641,5 +587,3 @@ no locale in their static pattern get the ``auto_locale_pattern`` option set.
641
587
642
588
This is ignored if there are no ``locales `` configured. It makes no sense to
643
589
enable this option when ``match_implicit_locale `` is disabled.
644
-
645
- .. _Alice : https://github.com/nelmio/alice
0 commit comments