ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDataCollectionObjective.php
Go to the documentation of this file.
1<?php
2
19declare(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}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
getPreconditions(Environment $environment)
@inheritdocs
achieve(Environment $environment)
@inheritdocs
This class attempt to achieve a set of database update steps.
language handling for setup
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
global $DIC
Definition: shib_login.php:26