diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php index 380a554..b0a69f6 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuTree.php @@ -546,11 +546,11 @@ protected function doBuildTreeData(array $links, array $parents = array(), $dept * * @param array $links * A flat array of menu links that are part of the menu. Each array element - * is an associative array of information about the menu link, containing the - * fields from the {menu_links} table, and optionally additional information - * from the {menu_router} table, if the menu item appears in both tables. - * This array must be ordered depth-first. See _menu_build_tree() for a sample - * query. + * is an associative array of information about the menu link, containing + * the fields from the {menu_links} table, and optionally additional + * information from the {menu_router} table, if the menu item appears in + * both tables. This array must be ordered depth-first. + * See _menu_build_tree() for a sample query. * @param array $parents * An array of the menu link ID values that are in the path from the current * page to the root of the menu tree. diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuTreeInterface.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuTreeInterface.php index dd0b50e..e4cd83d 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuTreeInterface.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuTreeInterface.php @@ -64,11 +64,11 @@ public function getPath($menu_name); * * @param array $links * A flat array of menu links that are part of the menu. Each array element - * is an associative array of information about the menu link, containing the - * fields from the {menu_links} table, and optionally additional information - * from the {menu_router} table, if the menu item appears in both tables. - * This array must be ordered depth-first. See _menu_build_tree() for a sample - * query. + * is an associative array of information about the menu link, containing + * the fields from the {menu_links} table, and optionally additional + * information from the {menu_router} table, if the menu item appears in + * both tables. This array must be ordered depth-first. + * See _menu_build_tree() for a sample query. * @param array $parents * An array of the menu link ID values that are in the path from the current * page to the root of the menu tree. @@ -80,10 +80,10 @@ public function getPath($menu_name); * associative array containing: * - link: The menu link item from $links, with additional element * 'in_active_trail' (TRUE if the link ID was in $parents). - * - below: An array containing the sub-tree of this item, where each element - * is a tree item array with 'link' and 'below' elements. This array will be - * empty if the menu item has no items in its sub-tree having a depth - * greater than or equal to $depth. + * - below: An array containing the sub-tree of this item, where each + * element is a tree item array with 'link' and 'below' elements. This + * array will be empty if the menu item has no items in its sub-tree + * having a depth greater than or equal to $depth. */ public function buildTreeData(array $links, array $parents = array(), $depth = 1); @@ -99,8 +99,8 @@ public function buildTreeData(array $links, array $parents = array(), $depth = 1 * (optional) The maximum depth of links to retrieve. * @param bool $only_active_trail * (optional) Whether to only return the links in the active trail (TRUE) - * instead of all links on every level of the menu link tree (FALSE). Defaults - * to FALSE. + * instead of all links on every level of the menu link tree (FALSE). + * Defaults to FALSE. * * @return array * An array of menu links, in the order they should be rendered. The array @@ -140,8 +140,8 @@ public function buildAllData($menu_name, $link = NULL, $max_depth = NULL); * The name of the menu. * * @return array - * A structured array representing the specified menu on the current page, to - * be rendered by drupal_render(). + * A structured array representing the specified menu on the current page, + * to be rendered by drupal_render(). */ public function renderMenu($menu_name); @@ -152,9 +152,9 @@ public function renderMenu($menu_name); * The name of the menu. * @param array $parameters * (optional) An associative array of build parameters. Possible keys: - * - expanded: An array of parent link ids to return only menu links that are - * children of one of the plids in this list. If empty, the whole menu tree - * is built, unless 'only_active_trail' is TRUE. + * - expanded: An array of parent link ids to return only menu links that + * are children of one of the plids in this list. If empty, the whole menu + * tree is built, unless 'only_active_trail' is TRUE. * - active_trail: An array of mlids, representing the coordinates of the * currently active menu link. * - only_active_trail: Whether to only return links that are in the active diff --git a/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php b/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php index 5d69c20..7e5b2ed 100644 --- a/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php +++ b/core/modules/menu_link/tests/Drupal/menu_link/Tests/MenuTreeTest.php @@ -330,7 +330,8 @@ public function testOutputWithComplexData() { // Validate that the hidden and no access items are missing $this->assertFalse(isset($output['5']), 'Hidden item should be missing'); $this->assertFalse(isset($output['6']), 'False access should be missing'); - // Item 7 is after a couple hidden items. Just to make sure that 5 and 6 are skipped and 7 still included + // Item 7 is after a couple hidden items. Just to make sure that 5 and 6 are + // skipped and 7 still included. $this->assertTrue(isset($output['7']), 'Item after hidden items is present'); }