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

Commit ee55daa

Browse files
committed
adding a note for the BurgovKeyValueFormBundle handling in sonata
1 parent 77d08f5 commit ee55daa

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

bundles/menu/sonata_admin.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,23 @@ These are the list of available options:
185185
See the `KnpMenuBundle documentation`_ for more information about these
186186
attributes.
187187

188+
Advanced Menu Options
189+
~~~~~~~~~~~~~~~~~~~~~
190+
188191
By default the only available options are **Display** and **Display Children**.
189-
To enable the advaned options you need to add ``burgov/key-value-form-bundle``
190-
requirement in your ``composer.json`` and enable the advanced options in
191-
your config file:
192+
You can enable advanced options, but need to add the BurgovKeyValueFormBundle_
193+
to your project. Run ``composer require burgov/key-value-form-bundle``,
194+
instantiate the bundle in the kernel and extend the template
195+
``SonataAdminBundle:Form:form_admin_fields.html.twig`` to add:
196+
197+
.. code-block:: jinja
198+
199+
{% block burgov_key_value_widget %}
200+
{{- block('sonata_type_native_collection_widget') -}}
201+
{% endblock %}
202+
203+
Once you enabled the bundle, you can enable the advanced menu options in your
204+
configuration:
192205

193206
.. configuration-block::
194207

@@ -232,3 +245,4 @@ your config file:
232245
.. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html
233246
.. _`configuring sonata admin`: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/reference/configuration.html
234247
.. _`KnpMenuBundle documentation`: http://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes
248+
.. _BurgovKeyValueFormBundle: https://github.com/Burgov/KeyValueFormBundle

0 commit comments

Comments
 (0)