Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions reference/configuration/menu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ persistence configuration has the following configuration:
enabled: false
menu_basepath: /cms/menu
content_basepath: ~
prefetch: 10
manager_name: ~
menu_document_class: Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu
node_document_class: Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode
Expand All @@ -46,6 +47,7 @@ persistence configuration has the following configuration:
enabled="false"
menu-basepath="/cms/menu"
content-basepath="null"
prefetch="10"
manager-name="null"
menu-document-class="null"
node-document-class="null"
Expand All @@ -66,6 +68,7 @@ persistence configuration has the following configuration:
'enabled' => false,
'menu_basepath' => '/cms/menu',
'content_basepath' => null,
'prefetch' => 10,
'manager_name' => null,
'menu_document_class' => null,
'node_document_class' => null,
Expand All @@ -82,11 +85,6 @@ enabled

.. include:: partials/persistence_phpcr_enabled.rst.inc

manager_name
""""""""""""

.. include:: partials/persistence_phpcr_manager_name.rst.inc

menu_basepath
"""""""""""""

Expand All @@ -95,7 +93,7 @@ menu_basepath
Specifies the path in the PHPCR-ODM document hierarchy under which the menu
documents can be found.

* This is the default location used by the
* This is the default location used by the
:doc:`MenuProvider <../../bundles/menu/menu_factory>` to locate menus.
* This is the default location for newly created menus in the Sonata admin
class.
Expand All @@ -115,8 +113,31 @@ the content branch of the document hierarchy in forms.
If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to
the value of ``%cmf_core.persistence.phpcr.basepath%/content``

menu_document
"""""""""""""
.. versionadded:: 1.1

The prefetch functionality was added in MenuBundle 1.1.

prefetch
""""""""

**type**: ``integer`` **default**: ``10``

When rendering a menu, the whole menu tree needs to be loaded. To reduce the
number of database requests that PHPCR needs to make, this setting makes the
tree loader prefetch all menu nodes in one call.

``10`` should be enough for most cases, if you have deeper menu structures you
might want to increase this.

To disable menu prefetch completely, set this option to ``0``.

manager_name
""""""""""""

.. include:: partials/persistence_phpcr_manager_name.rst.inc

menu_document_class
"""""""""""""""""""

**type**: ``string`` **default**:
``Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu``
Expand All @@ -125,8 +146,8 @@ Specifies the document class which should represent an entire menu.

This setting is used by the admin class.

node_document
"""""""""""""
node_document_class
"""""""""""""""""""

**type**: ``string`` **default**:
``Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode``
Expand Down Expand Up @@ -175,7 +196,7 @@ The ``voters`` section enables you to enable and configure *pre-defined* :doc:`v
.. code-block:: yaml

cmf_menu:
# ...
# ...
voters:
content_identity:
content_key: ~
Expand Down