You are here

public function UpdateTask::execute in Lightning Core 8.2

Same name and namespace in other branches
  1. 8.5 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::execute()
  2. 8 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::execute()
  3. 8.3 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::execute()
  4. 8.4 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::execute()

Prompts for confirmation and executes the task.

Parameters

\Symfony\Component\Console\Style\StyleInterface $io: The console style handler.

bool $force: (optional) If TRUE, the task is executed without confirmation.

File

src/UpdateTask.php, line 73

Class

UpdateTask

Namespace

Drupal\lightning_core

Code

public function execute(StyleInterface $io, $force = FALSE) {
  $proceed = $force ? TRUE : $this
    ->confirm($io);
  if ($proceed) {
    $this->reflector
      ->invoke($this->handler, $io);
  }
}