diff --git a/bundles/menu/configuration.rst b/bundles/menu/configuration.rst index f191f52f..72fbf1bc 100644 --- a/bundles/menu/configuration.rst +++ b/bundles/menu/configuration.rst @@ -64,9 +64,9 @@ persistence configuration has the following configuration: .. code-block:: php // app/config/config.php - $container->loadFromExtension('cmf_menu', array( - 'persistence' => array( - 'phpcr' => array( + $container->loadFromExtension('cmf_menu', [ + 'persistence' => [ + 'phpcr' => [ 'enabled' => false, 'menu_basepath' => '/cms/menu', 'content_basepath' => null, @@ -78,9 +78,9 @@ persistence configuration has the following configuration: 'menu_admin_class' => null, 'node_admin_class' => null, 'admin_recursive_breadcrumbs' => true, - ), - ), - )); + ], + ], + ]); ``enabled`` """"""""""" @@ -244,15 +244,14 @@ You can configure the menu options extension in this sections. .. code-block:: php // app/config/config.php - $container->loadFromExtension('cmf_menu', array( - 'admin_extensions' => array( - 'menu_options' => array( - 'enabled' => 'auto', - 'advanced' => false, - ), - ), - ), - )); + $container->loadFromExtension('cmf_menu', [ + 'admin_extensions' => [ + 'menu_options' => [ + 'enabled' => 'auto', + 'advanced' => false, + ], + ], + ]); ``enabled`` """"""""""" @@ -303,16 +302,16 @@ The ``voters`` section enables you to enable and configure *pre-defined* .. code-block:: php // app/config/config.php - $container->loadFromExtension('cmf_menu', array( - 'persistence' => array( - 'voters' => array( - 'content_identity' => array( + $container->loadFromExtension('cmf_menu', [ + 'persistence' => [ + 'voters' => [ + 'content_identity' => [ 'content_key' => null, - ), + ], 'uri_prefix' => false, - ), - ), - )); + ], + ], + ]); ``content_identity`` ~~~~~~~~~~~~~~~~~~~~ @@ -382,8 +381,8 @@ To disable the menu content voter, use: .. code-block:: php // app/config/config.php - $container->loadFromExtension('cmf_core', array( - 'publish_workflow' => array( + $container->loadFromExtension('cmf_core', [ + 'publish_workflow' => [ 'enabled' => false, - ), - )); + ], + ]); diff --git a/bundles/menu/introduction.rst b/bundles/menu/introduction.rst index 33d635a8..691b550d 100644 --- a/bundles/menu/introduction.rst +++ b/bundles/menu/introduction.rst @@ -36,11 +36,11 @@ bundles in addition to the CmfMenuBundle:: { public function registerBundles() { - $bundles = array( + $bundles = [ // ... new Knp\Bundle\MenuBundle\KnpMenuBundle(), new Symfony\Cmf\Bundle\MenuBundle\CmfMenuBundle(), - ); + ]; // ... } diff --git a/bundles/menu/menu_documents.rst b/bundles/menu/menu_documents.rst index 2c17fafb..8ae067f2 100644 --- a/bundles/menu/menu_documents.rst +++ b/bundles/menu/menu_documents.rst @@ -31,26 +31,26 @@ the KnpMenu component documentation for more information. // Attributes are the HTML attributes of the DOM element representing the // menu node (e.g.
) $node->setAttribute('attr_name', 'attr_value'); - $node->setAttributes(array('attr_name', 'attr_value')); - $node->setChildrenAttributes(array('attr_name', 'attr_value')); + $node->setAttributes(['attr_name', 'attr_value']); + $node->setChildrenAttributes(['attr_name', 'attr_value']); // Display the node or not $node->setDisplay(true); $node->setDisplayChildren(true); // Any extra attributes you wish to associate with the menu node - $node->setExtras(array('extra_param_1' => 'value')); + $node->setExtras(['extra_param_1' => 'value']); // The label and the HTML attributes of the label $node->setLabel('Menu Node'); - $node->setLabelAttributes(array('style' => 'color: red;')); + $node->setLabelAttributes(['style' => 'color: red;']); // The HTML attributes of the link (i.e. - $node->setLinkAttributes(array('style' => 'color: yellow;')); + $node->setLinkAttributes(['style' => 'color: yellow;']); // Specify a route name to use and the parameters to use with it $node->setRoute('my_hard_coded_route_name'); - $node->setRouteParameters(array()); + $node->setRouteParameters([]); // Specify if the route should be rendered absolute (otherwise relative) $node->setRouteAbsolute(true); diff --git a/bundles/menu/menu_factory.rst b/bundles/menu/menu_factory.rst index 019fa45e..64e31e78 100644 --- a/bundles/menu/menu_factory.rst +++ b/bundles/menu/menu_factory.rst @@ -183,7 +183,7 @@ The service needs to be tagged as event listener: