@@ -321,6 +321,7 @@ phpcr
321
321
content_basepath : /cms/content
322
322
admin_basepath : /cms/routes
323
323
use_sonata_admin : auto
324
+ enable_initializer : true
324
325
325
326
.. code-block :: xml
326
327
@@ -336,6 +337,7 @@ phpcr
336
337
content-basepath =" /cms/content"
337
338
admin-basepath =" /cms/routes"
338
339
use-sonata-admin =" auto"
340
+ enable_initializer =" true"
339
341
>
340
342
<route-basepath >/cms/routes</route-basepath >
341
343
<route-basepath >/cms/simple</route-basepath >
@@ -351,15 +353,16 @@ phpcr
351
353
'dynamic' => array(
352
354
'persistence' => array(
353
355
'phpcr' => array(
354
- 'enabled' => false,
355
- 'manager_name' => null,
356
- 'route_basepaths' => array(
356
+ 'enabled' => false,
357
+ 'manager_name' => null,
358
+ 'route_basepaths' => array(
357
359
'/cms/routes',
358
360
'/cms/simple',
359
361
)
360
- 'content_basepath' => '/cms/content',
361
- 'admin_basepath' => '/cms/routes',
362
- 'use_sonata_admin' => 'auto',
362
+ 'content_basepath' => '/cms/content',
363
+ 'admin_basepath' => '/cms/routes',
364
+ 'use_sonata_admin' => 'auto',
365
+ 'enable_initializer' => true,
363
366
),
364
367
),
365
368
),
@@ -424,6 +427,20 @@ SonataPhpcrAdminBundle is present.
424
427
If the :doc: `CoreBundle <../../bundles/core/index >` is registered, this will
425
428
default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin ``.
426
429
430
+ enable_initializer
431
+ ******************
432
+
433
+ **type **: ``boolean `` **default **: ``true ``
434
+
435
+ .. versionadded :: 1.3
436
+ This configuration option was introduced in RoutingBundle 1.3.
437
+
438
+ The bundle comes with an initializer that creates the nodes for the ``admin_basepath ``
439
+ automatically when initializing the repository or loading fixtures. Sometimes this
440
+ is not what you want, as the created node is of type 'Generic' and sometimes this
441
+ already needs to be a route (for the homepage). Set this to false to disable the
442
+ initializer when you create your nodes your self (e.g. using Alice _).
443
+
427
444
orm
428
445
"""
429
446
@@ -575,3 +592,5 @@ no locale in their static pattern get the ``auto_locale_pattern`` option set.
575
592
576
593
This is ignored if there are no ``locales `` configured. It makes no sense to
577
594
enable this option when ``match_implicit_locale `` is disabled.
595
+
596
+ .. _Alice : https://github.com/nelmio/alice
0 commit comments