Achieves an objective.  
 More...
Achieves an objective. 
Definition at line 41 of file AchieveCommand.php.
 
◆ __construct()
◆ configure()
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::configure  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 69 of file AchieveCommand.php.
   71         $this->setDescription(
"Achieve a named objective from an agent.");
    74             InputArgument::OPTIONAL,
    75             "Objective to be execute from an agent. Format: \$AGENT::\$OBJECTIVE"    77         $this->addArgument(
"config", InputArgument::OPTIONAL, 
"Configuration file for the installation");
    81             InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
    82             "Define fields in the configuration file that should be overwritten, e.g. \"a.b.c=foo\"",
    85         $this->addOption(
"yes", 
"y", InputOption::VALUE_NONE, 
"Confirm every message of the objective.");
    86         $this->addOption(
"list", null, InputOption::VALUE_NONE, 
"Lists all achievable objectives");
  
 
 
◆ execute()
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::execute  | 
          ( | 
          InputInterface  | 
          $input,  | 
         
        
           | 
           | 
          OutputInterface  | 
          $output  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
 
◆ executeAchieveObjective()
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::executeAchieveObjective  | 
          ( | 
          IOWrapper  | 
          $io,  | 
         
        
           | 
           | 
          InputInterface  | 
          $input  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
Definition at line 131 of file AchieveCommand.php.
References Vendor\Package\$e, ILIAS\Setup\CLI\addAgentConfigsToEnvironment(), ILIAS\Setup\CLI\IOWrapper\error(), ILIAS\Setup\CLI\getRelevantAgent(), ILIAS\Setup\NoConfirmationException\getRequestedConfirmation(), ILIAS\Setup\CLI\readAgentConfig(), ILIAS\Setup\Environment\RESOURCE_ADMIN_INTERACTION, ILIAS\Setup\CLI\IOWrapper\success(), and ILIAS\Setup\CLI\IOWrapper\title().
Referenced by ILIAS\Setup\CLI\AchieveCommand\execute().
  134         $objective_name = $input->getArgument(
'objective');
   136         $io->title(
"Achieve objective: $objective_name");
   139         if ($input->getArgument(
"config")) {
   143         $namedObjectives = $agent->getNamedObjectives($config);
   145         if (isset($namedObjectives[$objective_name])) {
   146             $objective = $namedObjectives[$objective_name];
   149                 "There is no named objective '$objective_name'"   153         if ($this->preconditions !== []) {
   154             $objective = 
new ObjectiveWithPreconditions(
   155                 $objective->create(),
   156                 ...$this->preconditions
   159             $objective = $objective->create();
   162         $environment = 
new ArrayEnvironment([
   165         if ($config !== null) {
   170             $this->achieveObjective($objective, $environment, $io);
   171             $io->success(
"Achieved objective '$objective_name'. Thanks and have fun!");
   172         } 
catch (NoConfirmationException 
$e) {
   173             $io->error(
"Aborted the attempt to achieve '$objective_name', a necessary confirmation is missing:\n\n" . $e->getRequestedConfirmation());
 
addAgentConfigsToEnvironment(Agent $agent, Config $config, Environment $environment)
 
getRelevantAgent(InputInterface $input)
 
readAgentConfig(Agent $agent, InputInterface $input, string $use_config_field=null)
 
const RESOURCE_ADMIN_INTERACTION
 
 
 
 
◆ executeListNamedObjectives()
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::executeListNamedObjectives  | 
          ( | 
          IOWrapper  | 
          $io,  | 
         
        
           | 
           | 
          OutputInterface  | 
          $output  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
 
◆ shouldListNamedObjectives()
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::shouldListNamedObjectives  | 
          ( | 
          InputInterface  | 
          $input | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 104 of file AchieveCommand.php.
Referenced by ILIAS\Setup\CLI\AchieveCommand\execute().
  108                 $input->getOption(
"list") !== null
   109                 && is_bool($input->getOption(
"list"))
   110                 && $input->getOption(
"list")
   114                 $input->getArgument(
"objective") === 
""   115                 || $input->getArgument(
"objective") === null
  
 
 
◆ $defaultName
  
  
      
        
          | ILIAS\Setup\CLI\AchieveCommand::$defaultName = "achieve" | 
         
       
   | 
  
staticprotected   | 
  
 
 
◆ $preconditions
  
  
      
        
          | array ILIAS\Setup\CLI\AchieveCommand::$preconditions = [] | 
         
       
   | 
  
protected   | 
  
 
 
◆ $refinery
  
  
      
        
          | Refinery ILIAS\Setup\CLI\AchieveCommand::$refinery | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: