diff --git a/admin_menu.module b/admin_menu.module index 870da5c..3340289 100644 --- a/admin_menu.module +++ b/admin_menu.module @@ -530,7 +530,7 @@ function admin_menu_output($complete = FALSE) { // name clashes with the contributed Admin module. drupal_alter('admin_menu_output', $content); - $content = \Drupal::service($content); + $content = \Drupal::service('renderer')->render($content); // Cache the menu for this user. if ($cache_server_enabled) { @@ -647,7 +647,7 @@ function theme_admin_menu_links($variables) { ); // Render children to determine whether this link is expandable. if (isset($elements[$path]['#type']) || isset($elements[$path]['#theme']) || isset($elements[$path]['#pre_render'])) { - $elements[$path]['#children'] = \Drupal::service($elements[$path]); + $elements[$path]['#children'] = \Drupal::service('renderer')->render($elements[$path]); } else { $elements[$path]['#children'] = theme('admin_menu_links', array('elements' => $elements[$path]));