You are here

protected function DbUpdateController::updateTasksList in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::updateTasksList()
  2. 9 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::updateTasksList()

Provides the update task list render array.

Parameters

string $active: The active task. Can be one of 'requirements', 'info', 'selection', 'run', 'results'.

Return value

array A render array.

1 call to DbUpdateController::updateTasksList()
DbUpdateController::handle in core/modules/system/src/Controller/DbUpdateController.php
Returns a database update page.

File

core/modules/system/src/Controller/DbUpdateController.php, line 558

Class

DbUpdateController
Controller routines for database update routes.

Namespace

Drupal\system\Controller

Code

protected function updateTasksList($active = NULL) {

  // Default list of tasks.
  $tasks = [
    'requirements' => $this
      ->t('Verify requirements'),
    'info' => $this
      ->t('Overview'),
    'selection' => $this
      ->t('Review updates'),
    'run' => $this
      ->t('Run updates'),
    'results' => $this
      ->t('Review log'),
  ];
  $task_list = [
    '#theme' => 'maintenance_task_list',
    '#items' => $tasks,
    '#active' => $active,
  ];
  return $task_list;
}