ILIAS  release_8 Revision v8.24
class.ilDataCollectionObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
25{
28
30 {
33 } else {
34 throw new InvalidArgumentException('$steps must be instance of ilDataCollectionDBUpdateSteps');
35 }
36 }
37
38 public function getPreconditions(Environment $environment): array
39 {
40 return array_merge(
41 parent::getPreconditions($environment),
42 [
45 ]
46 );
47 }
48
49 public function achieve(Environment $environment): Environment
50 {
51 global $DIC;
52 $DIC = new Container();
53 $DIC['lng'] = new ilSetupLanguage('en');
54 $DIC['ilDB'] = $environment->getResource(Environment::RESOURCE_DATABASE);
55 $DIC['component.factory'] = $environment->getResource(Environment::RESOURCE_COMPONENT_FACTORY);
56 $DIC['component.repository'] = $environment->getResource(Environment::RESOURCE_COMPONENT_REPOSITORY);
57 return parent::achieve($environment);
58 }
59}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilDatabaseUpdateSteps $steps)
getPreconditions(Environment $environment)
@inheritdocs
achieve(Environment $environment)
@inheritdocs
This class attempt to achieve a set of database update steps.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc