BatchController::batchPage

public BatchController::batchPage(Request $request)

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

File

core/modules/system/src/Controller/BatchController.php, line 53

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;
  }
}
doc_Drupal
2016-10-29 08:46:04
Comments
Leave a Comment

Please login to continue.