Issue #2046385 by dawehner, pwolanin: Fixed _menu_navigation_links_rebuild() fails when menu_link module is not enabled.

8.0.x
Nathaniel Catchpole 2013-08-12 14:28:56 +01:00
parent 6400bf8b21
commit 6cfcb25b78
1 changed files with 6 additions and 8 deletions

View File

@ -2840,15 +2840,13 @@ function menu_get_router() {
* @todo This function should be removed/refactored.
*/
function _menu_navigation_links_rebuild($menu) {
if (module_exists('menu_link')) {
$menu_link_controller = Drupal::entityManager()
->getStorageController('menu_link');
}
else {
// The Menu link module is not available at install time, so we need to
// hardcode the default storage controller.
$menu_link_controller = new MenuLinkStorageController('menu_link', Drupal::service('database'), Drupal::service('router.route_provider'));
if (!module_exists('menu_link')) {
// The Menu link module may not be available during install, so rebuild
// when possible.
return;
}
$menu_link_controller = Drupal::entityManager()
->getStorageController('menu_link');
// Add normal and suggested items as links.
$router_items = array();