@@ -27,6 +27,7 @@ persistence configuration has the following configuration:
27
27
enabled : false
28
28
menu_basepath : /cms/menu
29
29
content_basepath : ~
30
+ prefetch : 10
30
31
manager_name : ~
31
32
menu_document_class : Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu
32
33
node_document_class : Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode
@@ -46,6 +47,7 @@ persistence configuration has the following configuration:
46
47
enabled =" false"
47
48
menu-basepath =" /cms/menu"
48
49
content-basepath =" null"
50
+ prefetch =" 10"
49
51
manager-name =" null"
50
52
menu-document-class =" null"
51
53
node-document-class =" null"
@@ -66,6 +68,7 @@ persistence configuration has the following configuration:
66
68
'enabled' => false,
67
69
'menu_basepath' => '/cms/menu',
68
70
'content_basepath' => null,
71
+ 'prefetch' => 10,
69
72
'manager_name' => null,
70
73
'menu_document_class' => null,
71
74
'node_document_class' => null,
@@ -82,11 +85,6 @@ enabled
82
85
83
86
.. include :: partials/persistence_phpcr_enabled.rst.inc
84
87
85
- manager_name
86
- """"""""""""
87
-
88
- .. include :: partials/persistence_phpcr_manager_name.rst.inc
89
-
90
88
menu_basepath
91
89
"""""""""""""
92
90
@@ -95,7 +93,7 @@ menu_basepath
95
93
Specifies the path in the PHPCR-ODM document hierarchy under which the menu
96
94
documents can be found.
97
95
98
- * This is the default location used by the
96
+ * This is the default location used by the
99
97
:doc: `MenuProvider <../../bundles/menu/menu_factory >` to locate menus.
100
98
* This is the default location for newly created menus in the Sonata admin
101
99
class.
@@ -115,8 +113,31 @@ the content branch of the document hierarchy in forms.
115
113
If the :doc: `CoreBundle <../../bundles/core/index >` is registered, this will default to
116
114
the value of ``%cmf_core.persistence.phpcr.basepath%/content ``
117
115
118
- menu_document
119
- """""""""""""
116
+ .. versionadded :: 1.1
117
+
118
+ The prefetch functionality was added in MenuBundle 1.1.
119
+
120
+ prefetch
121
+ """"""""
122
+
123
+ **type **: ``integer `` **default **: ``10 ``
124
+
125
+ When rendering a menu, the whole menu tree needs to be loaded. To reduce the
126
+ number of database requests that PHPCR needs to make, this setting makes the
127
+ tree loader prefetch all menu nodes in one call.
128
+
129
+ ``10 `` should be enough for most cases, if you have deeper menu structures you
130
+ might want to increase this.
131
+
132
+ To disable menu prefetch completely, set this option to ``0 ``.
133
+
134
+ manager_name
135
+ """"""""""""
136
+
137
+ .. include :: partials/persistence_phpcr_manager_name.rst.inc
138
+
139
+ menu_document_class
140
+ """""""""""""""""""
120
141
121
142
**type **: ``string `` **default **:
122
143
``Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu ``
@@ -125,8 +146,8 @@ Specifies the document class which should represent an entire menu.
125
146
126
147
This setting is used by the admin class.
127
148
128
- node_document
129
- """""""""""""
149
+ node_document_class
150
+ """""""""""""""""""
130
151
131
152
**type **: ``string `` **default **:
132
153
``Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode ``
@@ -175,7 +196,7 @@ The ``voters`` section enables you to enable and configure *pre-defined* :doc:`v
175
196
.. code-block :: yaml
176
197
177
198
cmf_menu :
178
- # ...
199
+ # ...
179
200
voters :
180
201
content_identity :
181
202
content_key : ~
0 commit comments