diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php index 3deaf46..d9fcdb4 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/Entity/MenuLink.php @@ -365,7 +365,6 @@ public function reset() { // 'menu_name' are not stored anywhere else. Since resetting a link happens // rarely and this is a one-time operation, retrieving the full set of // default menu links does little harm. - // @todo Decide whether we want to keep the reset functionality. $all_links = menu_get_default_links(); $original = $all_links[$this->machine_name]; $original['machine_name'] = $this->machine_name; @@ -641,4 +640,5 @@ public function build() { ); return $build; } + } diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php index 2551749..16918d9 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php @@ -378,4 +378,5 @@ public function createFromDefaultLink(array $item) { $item['module'] = 'system'; return $this->create($item); } + } diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php index ff35aca..7e36bb3 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageControllerInterface.php @@ -106,4 +106,5 @@ public function getParentFromHierarchy(EntityInterface $entity); * A menu link entity. */ public function createFromDefaultLink(array $item); + } diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index af98057..aed99af 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -512,17 +512,17 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) { * this menu item (as a result of other properties), then the menu link is * always expanded, equivalent to its 'always expanded' checkbox being set * in the UI. - * - type: (optional) A bitmask of flags describing properties of the menu item. - * The following two bitmasks are provided as constants in menu.inc: + * - type: (optional) A bitmask of flags describing properties of the menu + * item. The following two bitmasks are provided as constants in menu.inc: * - MENU_NORMAL_ITEM: Normal menu items show up in the menu tree and can be * moved/hidden by the administrator. * - MENU_SUGGESTED_ITEM: Modules may "suggest" menu items that the * administrator may enable. * If the "type" element is omitted, MENU_NORMAL_ITEM is assumed. - * - options: (optional) An array of options to be passed to l() when generating a link - * from this menu item. + * - options: (optional) An array of options to be passed to l() when + * generating a link from this menu item. * - * @see hook_default_menu_links_alter + * @see hook_default_menu_links_alter() */ function hook_default_menu_links() { $links['user'] = array( @@ -545,7 +545,7 @@ function hook_default_menu_links() { /** * Alter links for menus. * - * @see hook_default_menu_links + * @see hook_default_menu_links() */ function hook_default_menu_links_alter(&$links) { // Change the weight and title of the user.logout link. diff --git a/core/modules/system/system.module b/core/modules/system/system.module index e9bd714..00518b3 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -821,7 +821,6 @@ function system_menu() { * Implements hook_default_menu_links(). */ function system_default_menu_links() { - $items['admin'] = array( 'link_title' => 'Administration', 'route_name' => 'system.admin', diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 751e115..175f4d9 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1533,19 +1533,20 @@ public function executeHookMenu($display_id = NULL, &$callbacks = array()) { } /** - * Called to get hook_default_menu_links() information from the view and the named display handler. + * Returns default menu links information from the view and the named display + * handler. * * @param string $display_id - * A display id. + * A display ID. * @param array $links - * A menu callback array passed from views_default_menu_links_alter(). + * An array of default menu link items passed from + * views_default_menu_links_alter(). * * @return array|bool */ public function executeHookDefaultMenuLinks($display_id = NULL, &$links = array()) { - // Prepare the view with the information we have. - - // This was probably already called, but it's good to be safe. + // Prepare the view with the information we have. This was probably already + // called, but it's good to be safe. if (!$this->setDisplay($display_id)) { return FALSE; } diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 01dcc95..6bde203 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -319,7 +319,8 @@ function views_menu_alter(&$callbacks) { * Implements hook_default_menu_links_alter(). */ function views_default_menu_links_alter(array &$links) { - // @todo What to do about all that crazy logic in views_menu_alter(). + // @todo Decide what to do with all the crazy logic in views_menu_alter() in + // https://drupal.org/node/2107533. $views = Views::getApplicableViews('uses_hook_menu'); foreach ($views as $data) { /** @var \Drupal\views\ViewExecutable $view */