You are here

public function BatchController::batchPage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Controller/BatchController.php \Drupal\system\Controller\BatchController::batchPage()

Returns a system batch page.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The current request object.

Return value

\Symfony\Component\HttpFoundation\Response|array A \Symfony\Component\HttpFoundation\Response object or render array.

Throws

\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException

1 string reference to 'BatchController::batchPage'
system.routing.yml in core/modules/system/system.routing.yml
core/modules/system/system.routing.yml

File

core/modules/system/src/Controller/BatchController.php, line 58
Contains \Drupal\system\Controller\BatchController.

Class

BatchController
Controller routines for batch routes.

Namespace

Drupal\system\Controller

Code

public function batchPage(Request $request) {
  require_once $this->root . '/core/includes/batch.inc';
  $output = _batch_page($request);
  if ($output === FALSE) {
    throw new AccessDeniedHttpException();
  }
  elseif ($output instanceof Response) {
    return $output;
  }
  elseif (isset($output)) {
    $page = [
      '#type' => 'page',
      '#show_messages' => FALSE,
      'content' => $output,
    ];
    return $page;
  }
}