From 9ce7bd822bbea7f872a784d26def4ace5bd50029 Mon Sep 17 00:00:00 2001 From: mkoosej Date: Mon, 11 Aug 2014 17:04:52 -0400 Subject: [PATCH 1/4] add MenuOptionsInterface docs --- bundles/menu/sonata_admin.rst | 73 +++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/bundles/menu/sonata_admin.rst b/bundles/menu/sonata_admin.rst index 970e4124..b28495e7 100644 --- a/bundles/menu/sonata_admin.rst +++ b/bundles/menu/sonata_admin.rst @@ -121,6 +121,79 @@ configuration in the ``sonata_admin`` section of your project configuration: See the `Sonata Admin extension documentation`_ for more information. +MenuOptionInterface Sonata Admin Extension +------------------------------------------------- + +This bundle provides an extension that allows user to edit different menu options using the Sonata admin interface. + +To enable the extensions in your admin classes, simply define the extension +configuration in the ``sonata_admin`` section of your project configuration: + +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + sonata_admin: + # ... + extensions: + cmf_menu.admin_extension.menu_options: + implements: + - Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface + + .. code-block:: xml + + + + + + + + + Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('sonata_admin', array( + 'extensions' => array( + 'cmf_menu.admin_extension.menu_options' => array( + 'implements' => array( + 'Symfony\Cmf\Bundle\MenuBundle\Model\MenuOptionsInterface', + ), + ), + ), + )); + +See the `Sonata Admin extension documentation`_ for more information. + +These are the list of available options: + +- Display +- Display children +- Menu attributes (advanced) +- Label attributes (advanced) +- Children attributes (advanced) +- Link attributes (advanced) + +See the `KnpMenuBundle Documentations` for more information about these attributes. +By default the only available options are Display and Display Children. To enable the advaned options you need to add "burgov/key-value-form-bundle" requirement in your composer and enable the advanced options in your config file: + +.. configuration-block:: + + .. code-block:: yaml + + cmf_menu: + admin_extensions: + menu_options: + advanced: true + .. _`Sonata Admin extension documentation`: http://sonata-project.org/bundles/admin/master/doc/reference/extensions.html .. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html .. _`configuring sonata admin`: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/reference/configuration.html +.. _`KnpMenuBundle Documentations`: https://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes From 9583a3bfa6da90cc967c210471f537ec8283638e Mon Sep 17 00:00:00 2001 From: mkoosej Date: Mon, 11 Aug 2014 17:06:48 -0400 Subject: [PATCH 2/4] Update sonata_admin.rst --- bundles/menu/sonata_admin.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/menu/sonata_admin.rst b/bundles/menu/sonata_admin.rst index b28495e7..59b697b5 100644 --- a/bundles/menu/sonata_admin.rst +++ b/bundles/menu/sonata_admin.rst @@ -196,4 +196,4 @@ By default the only available options are Display and Display Children. To enabl .. _`Sonata Admin extension documentation`: http://sonata-project.org/bundles/admin/master/doc/reference/extensions.html .. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html .. _`configuring sonata admin`: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/reference/configuration.html -.. _`KnpMenuBundle Documentations`: https://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes +.. _`KnpMenuBundle Documentations`: http://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes From faf2b2d0ef258b133565ef25307b8c0d564438b3 Mon Sep 17 00:00:00 2001 From: mkoosej Date: Mon, 11 Aug 2014 17:13:14 -0400 Subject: [PATCH 3/4] Update sonata_admin.rst --- bundles/menu/sonata_admin.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bundles/menu/sonata_admin.rst b/bundles/menu/sonata_admin.rst index 59b697b5..75193d41 100644 --- a/bundles/menu/sonata_admin.rst +++ b/bundles/menu/sonata_admin.rst @@ -181,13 +181,15 @@ These are the list of available options: - Children attributes (advanced) - Link attributes (advanced) -See the `KnpMenuBundle Documentations` for more information about these attributes. -By default the only available options are Display and Display Children. To enable the advaned options you need to add "burgov/key-value-form-bundle" requirement in your composer and enable the advanced options in your config file: +See the `KnpMenuBundle documentation`_ for more information about these attributes. + +By default the only available options are **Display** and **Display Children**. To enable the advaned options you need to add "burgov/key-value-form-bundle" requirement in your composer.json and enable the advanced options in your config file: .. configuration-block:: .. code-block:: yaml - + + # app/config/config.yml cmf_menu: admin_extensions: menu_options: @@ -196,4 +198,4 @@ By default the only available options are Display and Display Children. To enabl .. _`Sonata Admin extension documentation`: http://sonata-project.org/bundles/admin/master/doc/reference/extensions.html .. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html .. _`configuring sonata admin`: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/reference/configuration.html -.. _`KnpMenuBundle Documentations`: http://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes +.. _`KnpMenuBundle documentation`: http://github.com/KnpLabs/KnpMenu/blob/master/doc/01-Basic-Menus.markdown#menu-attributes From c6043e86a127cd9f7d7b7000b5b01d878a647395 Mon Sep 17 00:00:00 2001 From: mkoosej Date: Tue, 12 Aug 2014 11:05:57 -0400 Subject: [PATCH 4/4] Update sonata_admin.rst --- bundles/menu/sonata_admin.rst | 45 ++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/bundles/menu/sonata_admin.rst b/bundles/menu/sonata_admin.rst index 75193d41..e3f01fd8 100644 --- a/bundles/menu/sonata_admin.rst +++ b/bundles/menu/sonata_admin.rst @@ -126,8 +126,7 @@ MenuOptionInterface Sonata Admin Extension This bundle provides an extension that allows user to edit different menu options using the Sonata admin interface. -To enable the extensions in your admin classes, simply define the extension -configuration in the ``sonata_admin`` section of your project configuration: +To enable the extensions in your admin classes, simply define the extension configuration in the ``sonata_admin`` section of your project configuration: .. configuration-block:: @@ -174,16 +173,16 @@ See the `Sonata Admin extension documentation`_ for more information. These are the list of available options: -- Display -- Display children -- Menu attributes (advanced) -- Label attributes (advanced) -- Children attributes (advanced) -- Link attributes (advanced) + Display + Display children + Menu attributes (advanced) + Label attributes (advanced) + Children attributes (advanced) + Link attributes (advanced) See the `KnpMenuBundle documentation`_ for more information about these attributes. -By default the only available options are **Display** and **Display Children**. To enable the advaned options you need to add "burgov/key-value-form-bundle" requirement in your composer.json and enable the advanced options in your config file: +By default the only available options are **Display** and **Display Children**. To enable the advaned options you need to add ``burgov/key-value-form-bundle`` requirement in your ``composer.json`` and enable the advanced options in your config file: .. configuration-block:: @@ -194,6 +193,34 @@ By default the only available options are **Display** and **Display Children**. admin_extensions: menu_options: advanced: true + + + .. code-block:: xml + + + + + + + + + + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('cmf_menu', array( + 'admin_extensions' => array( + 'menu_options' => array( + 'advanced' => true, + ), + ), + )); .. _`Sonata Admin extension documentation`: http://sonata-project.org/bundles/admin/master/doc/reference/extensions.html .. _SonataDoctrinePHPCRAdminBundle: http://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/index.html