55 $this->style =
new SymfonyStyle($in, $out);
61 $this->style->progressStart($max);
66 $this->style->progressAdvance();
71 $this->style->progressFinish();
77 $this->style->note($message);
84 return $this->style->ask(
87 function (
string $input) use ($type_text_to_confirm) :
bool {
88 return $type_text_to_confirm === $input;
92 $this->
inform(
"Automatically confirmed:\n\n$message");
101 return $this->style->confirm($message,
false);
103 $this->
inform(
"Automatically confirmed:\n\n$message");
112 if ($this->
shouldSayYes() || ($this->in->hasOption(
"no-interaction") && $this->in->getOption(
"no-interaction"))) {
116 " ILIAS Copyright (C) 1998-2019 ILIAS Open Source e.V. - GPLv3\n\n" .
117 "This program comes with ABSOLUTELY NO WARRANTY. This is free software,\n" .
118 "and you are welcome to redistribute it under certain conditions. Look\n" .
119 "into the LICENSE file for details." 125 return $this->in->getOption(
"yes") ??
false;
128 public function title(
string $title) : void
130 $this->style->title($title);
135 $this->style->success($text);
138 public function error(
string $text) : void
140 $this->style->error($text);
143 public function text(
string $text) : void
145 $this->style->text($text);
150 $this->last_objective_was_notable = $is_notable;
151 $this->last_objective_label = $label;
152 $this->output_in_objective =
false;
154 $this->style->write(str_pad($label .
"...", self::LABEL_WIDTH));
160 if ($this->output_in_objective) {
161 $this->
startObjective($this->last_objective_label, $this->last_objective_was_notable);
165 $this->style->write(
"[<fg=green>OK</>]\n");
172 if ($this->output_in_objective || !$this->last_objective_was_notable) {
177 $this->style->write(
"[<fg=red>FAILED</>]\n");
184 $this->output_in_objective =
true;
185 $this->style->write(
"[in progress]\n");
191 return $this->last_objective_was_notable
192 || $this->out->isVeryVerbose()
193 || $this->out->isDebug();
198 return $this->out->isVerbose();
Wrapper around symfonies input and output facilities to provide just the functionality required for t...
startObjective(string $label, bool $is_notable)
__construct(InputInterface $in, OutputInterface $out)
This defines ways in which objectives may interact with admins during the setup.
confirmOrDeny(string $message)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
confirmExplicit(string $message, string $type_text_to_confirm)
$last_objective_was_notable