public function ToolbarController::subtreesJsonp

Returns the rendered subtree of each top-level toolbar link.

Return value

\Symfony\Component\HttpFoundation\JsonResponse

1 string reference to 'ToolbarController::subtreesJsonp'

File

drupal/core/modules/toolbar/lib/Drupal/toolbar/Routing/ToolbarController.php, line 22
Contains \Drupal\toolbar\Routing\ToolbarController.

Class

ToolbarController
Defines a controller for the toolbar module.

Namespace

Drupal\toolbar\Routing

Code

public function subtreesJsonp() {
  _toolbar_initialize_page_cache();
  $subtrees = toolbar_get_rendered_subtrees();
  $response = new JsonResponse($subtrees);
  $response
    ->setCallback('Drupal.toolbar.setSubtrees');
  return $response;
}