19 declare(strict_types=1);
    62         $this->agent_finder = $agent_finder;
    63         $this->config_reader = $config_reader;
    69         $this->setDescription(
"Creates a fresh ILIAS installation based on the config");
    70         $this->addArgument(
"config", InputArgument::OPTIONAL, 
"Configuration file for the installation");
    71         $this->addOption(
"config", null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 
"Define fields in the configuration file that should be overwritten, e.g. \"a.b.c=foo\"", []);
    72         $this->addOption(
"yes", 
"y", InputOption::VALUE_NONE, 
"Confirm every message of the installation.");
    73         $this->addOption(
"import-file", 
"i", InputOption::VALUE_REQUIRED, 
"Path to zip file to import from.");
    77     protected function execute(InputInterface $input, OutputInterface $output): 
int    81         if (!defined(
"ILIAS_SETUP_IGNORE_DB_UPDATE_STEP_MESSAGES")) {
    82             define(
"ILIAS_SETUP_IGNORE_DB_UPDATE_STEP_MESSAGES", 
true);
    85         if ($input->hasOption(
'legacy-plugin') && $input->getOption(
'legacy-plugin') != 
"") {
    91             $this->achieveObjective($objective, $environment, $io);
    92             if ($input->hasOption(
"import-file") && $input->getOption(
"import-file") != 
"") {
    93                 $io->inform(
"Please ensure that all ILIAS directories (webdir/datadir/Customizing) have the right owner after import process.");
    95             $io->success(
"Installation complete. Thanks and have fun!");
   106         $io->printLicenseMessage();
   107         $io->title(
"Install ILIAS");
   113         if ($input->hasOption(
"import-file") && $input->getOption(
"import-file") != 
"") {
   114             if ($input->getArgument(
"config") == 
"") {
   115                 throw new \InvalidArgumentException(
"Missing configuration file.");
   117             $import_file = $input->getOption(
"import-file");
   118             if (!is_file($import_file)) {
   119                 throw new \InvalidArgumentException(
"Can't find import file '$import_file'.");
   122             if (pathinfo($import_file)[
"extension"] != 
"zip") {
   123                 throw new \InvalidArgumentException(
"Wrong file format for import file. 'zip' is expected.");
   127             if (is_null($tmp_dir)) {
   128                 throw new \RuntimeException(
"Can't create temporary directory!");
   130             $environment = $environment
   131                 ->withConfigFor(self::IMPORT, $input->getOption(
"import-file"))
   132                 ->withConfigFor(self::TMP_DIR, $tmp_dir)
   137                 array_merge($input->getOption(
"config"), [
"database.path_to_db_dump=$dump_path"])
   146             "Install and Update ILIAS",
   148             $agent->getInstallObjective($config),
   149             $agent->getUpdateObjective($config)
   151         if ($this->preconditions !== []) {
   154                 ...$this->preconditions
   163         $common_config = $config->getConfig(
"common");
   164         $environment = $environment->withResource(
   166             $common_config->getClientId()
   169         return [$objective, $environment, $io];
   175         $io->printLicenseMessage();
   176         $io->title(
"Install ILIAS Plugin");
   180         $config = $this->
readAgentConfig($agent, $input, $input->getOption(
"legacy-plugin"));
   183             "Install and Update ILIAS Plugin",
   185             $agent->getInstallObjective($config),
   186             $agent->getUpdateObjective($config)
   188         if ($this->preconditions !== []) {
   191                 ...$this->preconditions
   199         if (!is_null($config)) {
   203         return [$objective, $environment, $io];
   208         $path = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . mt_rand() . microtime(
true);
 
A objective collection is a objective that is achieved once all subobjectives are achieved...
 
Read a json-formatted config from a file and overwrite some fields. 
 
Wrapper around symfonies input and output facilities to provide just the functionality required for t...
 
prepareILIASInstallation(InputInterface $input, OutputInterface $output)
 
execute(InputInterface $input, OutputInterface $output)
 
A wrapper around an objective that adds some preconditions. 
 
__construct(AgentFinder $agent_finder, ConfigReader $config_reader, array $preconditions)
 
addAgentConfigsToEnvironment(Agent $agent, Config $config, Environment $environment)
 
getRelevantAgent(InputInterface $input)
 
preparePluginInstallation(InputInterface $input, OutputInterface $output)
 
readAgentConfig(Agent $agent, InputInterface $input, string $use_config_field=null)
 
array $preconditions
var Objective[] 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
configureCommandForPlugins()
 
__construct(Container $dic, ilPlugin $plugin)
 
const RESOURCE_ADMIN_INTERACTION
 
trait HasAgent
Add this to an Command that has an agent. 
 
getRequestedConfirmation()
 
Signals that a necessary confirmation from the admin is missing. 
 
trait HasConfigReader
Add this to an Command that has an config reader.