ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDataCollectionObjective Class Reference
+ Inheritance diagram for ilDataCollectionObjective:
+ Collaboration diagram for ilDataCollectionObjective:

Public Member Functions

 __construct (ilDatabaseUpdateSteps $steps)
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
- Public Member Functions inherited from ilDatabaseUpdateStepsExecutedObjective
 __construct (protected ilDatabaseUpdateSteps $steps)
 
 getHash ()
 The hash for the objective is calculated over the classname and the steps that are contained. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 
 getPreconditions (Environment $environment)
 
 achieve (Environment $environment)
 
 isApplicable (Environment $environment)
 

Protected Attributes

ilDatabaseUpdateSteps $steps
 
- Protected Attributes inherited from ilDatabaseUpdateStepsExecutedObjective
string $steps_class
 

Additional Inherited Members

- Data Fields inherited from ilDatabaseUpdateStepsExecutedObjective
const STEP_METHOD_PREFIX = "step_"
 
- Protected Member Functions inherited from ilDatabaseUpdateStepsExecutedObjective
 throwStepNotFinishedException (int $started, int $finished)
 

Detailed Description

Definition at line 24 of file class.ilDataCollectionObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionObjective::__construct ( ilDatabaseUpdateSteps  $steps)

Definition at line 29 of file class.ilDataCollectionObjective.php.

References ILIAS\GlobalScreen\Provider\__construct().

30  {
31  if ($steps instanceof ilDataCollectionDBUpdateSteps9) {
32  parent::__construct($steps);
33  } else {
34  throw new InvalidArgumentException('$steps must be instance of ilDataCollectionDBUpdateSteps9');
35  }
36  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ achieve()

ilDataCollectionObjective::achieve ( Environment  $environment)

Objectives can be achieved.

They might add resources to the environment when they have been achieved.

This method needs to be idempotent for a given environment. That means: if this is executed a second time, nothing new should happen. Or the other way round: if the environment already looks like desired, the objective should not take any further actions when this is called.

Exceptions

Implements ILIAS\Setup\Objective.

Definition at line 49 of file class.ilDataCollectionObjective.php.

References $DIC, and ILIAS\Setup\Environment\getResource().

49  : 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  }
language handling for setup
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
global $DIC
Definition: shib_login.php:22
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
+ Here is the call graph for this function:

◆ getPreconditions()

ilDataCollectionObjective::getPreconditions ( Environment  $environment)

Objectives might depend on other objectives.

Exceptions
UnachievableExceptionif the objective is not achievable
Returns
Objective[]

Implements ILIAS\Setup\Objective.

Definition at line 38 of file class.ilDataCollectionObjective.php.

38  : array
39  {
40  return array_merge(
41  parent::getPreconditions($environment),
42  [
45  ]
46  );
47  }

Field Documentation

◆ $steps

ilDatabaseUpdateSteps ilDataCollectionObjective::$steps
protected

Definition at line 27 of file class.ilDataCollectionObjective.php.


The documentation for this class was generated from the following file: