ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilDataCollectionObjective Class Reference
+ Inheritance diagram for ilDataCollectionObjective:
+ Collaboration diagram for ilDataCollectionObjective:

Public Member Functions

 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)
 

Additional Inherited Members

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

Detailed Description

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

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 37 of file class.ilDataCollectionObjective.php.

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

37  : 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  }
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.
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 26 of file class.ilDataCollectionObjective.php.

26  : array
27  {
28  return array_merge(
29  parent::getPreconditions($environment),
30  [
33  ]
34  );
35  }

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