protected function UpdateTask::confirm in Lightning Core 8.3
Same name and namespace in other branches
- 8.5 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::confirm()
- 8 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::confirm()
- 8.2 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::confirm()
- 8.4 src/UpdateTask.php \Drupal\lightning_core\UpdateTask::confirm()
Asks for confirmation before executing the task.
Parameters
\Symfony\Component\Console\Style\StyleInterface $io: The output style.
Return value
bool TRUE if the task is confirmed, FALSE otherwise.
1 call to UpdateTask::confirm()
- UpdateTask::execute in src/
UpdateTask.php - Prompts for confirmation and executes the task.
File
- src/
UpdateTask.php, line 56
Class
Namespace
Drupal\lightning_coreCode
protected function confirm(StyleInterface $io) {
if ($this->docBlock
->hasTag('ask')) {
$tags = $this->docBlock
->getTagsByName('ask');
return $io
->confirm(reset($tags)
->getDescription());
}
return TRUE;
}