public function DialogController::modal

Displays content in a modal dialog.

Parameters

\Symfony\Component\HttpFoundation\RequestRequest $request: The request object.

callable $_content: The body content callable that contains the body region of this page.

Return value

\Drupal\Core\Ajax\AjaxResponse AjaxResponse to return the content wrapper in a modal dialog.

File

drupal/core/lib/Drupal/Core/Controller/DialogController.php, line 76
Contains \Drupal\Core\Controller\DialogController.

Class

DialogController
Defines a default controller for dialog requests.

Namespace

Drupal\Core\Controller

Code

public function modal(Request $request, $_content) {
  return $this
    ->dialog($request, $_content, TRUE);
}