ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilDataCollectionObjective.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
25 {
26  public function getPreconditions(Environment $environment): array
27  {
28  return array_merge(
29  parent::getPreconditions($environment),
30  [
33  ]
34  );
35  }
36 
37  public function achieve(Environment $environment): Environment
38  {
39  global $DIC;
40  $DIC = new Container();
41  $DIC['lng'] = new ilSetupLanguage('en');
42  $DIC['ilDB'] = $environment->getResource(Environment::RESOURCE_DATABASE);
43  $DIC['component.factory'] = $environment->getResource(Environment::RESOURCE_COMPONENT_FACTORY);
44  $DIC['component.repository'] = $environment->getResource(Environment::RESOURCE_COMPONENT_REPOSITORY);
45  return parent::achieve($environment);
46  }
47 }
getPreconditions(Environment $environment)
Objectives might depend on other objectives.
language handling for setup
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
global $DIC
Definition: shib_login.php:26
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
achieve(Environment $environment)
Objectives can be achieved.
An environment holds resources to be used in the setup process.
Definition: Environment.php:27