ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Setup\ObjectiveCollection Class Reference

A objective collection is a objective that is achieved once all subobjectives are achieved. More...

+ Inheritance diagram for ILIAS\Setup\ObjectiveCollection:
+ Collaboration diagram for ILIAS\Setup\ObjectiveCollection:

Public Member Functions

 __construct (string $label, bool $is_notable, Objective ... $objectives)
 
 getObjectives ()
 
 getHash ()
 @inheritdocs More...
 
 getLabel ()
 @inheritdocs More...
 
 isNotable ()
 @inheritdocs More...
 
 getPreconditions (Environment $environment)
 @inheritdocs More...
 
 achieve (Environment $environment)
 @inheritdocs More...
 
 isApplicable (Environment $environment)
 @inheritdocs More...
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Protected Attributes

string $label
 
bool $is_notable
 
array $objectives
 

Detailed Description

A objective collection is a objective that is achieved once all subobjectives are achieved.

Definition at line 26 of file ObjectiveCollection.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\ObjectiveCollection::__construct ( string  $label,
bool  $is_notable,
Objective ...  $objectives 
)

Member Function Documentation

◆ achieve()

ILIAS\Setup\ObjectiveCollection::achieve ( Environment  $environment)

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 95 of file ObjectiveCollection.php.

96 {
97 return $environment;
98 }
An environment holds resources to be used in the setup process.
Definition: Environment.php:28

◆ getHash()

ILIAS\Setup\ObjectiveCollection::getHash ( )

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 54 of file ObjectiveCollection.php.

54 : string
55 {
56 return hash(
57 "sha256",
58 get_class($this) .
59 implode(
60 array_map(
61 fn ($g): string => $g->getHash(),
62 $this->objectives
63 )
64 )
65 );
66 }

◆ getLabel()

ILIAS\Setup\ObjectiveCollection::getLabel ( )

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 71 of file ObjectiveCollection.php.

71 : string
72 {
73 return $this->label;
74 }

References ILIAS\Setup\ObjectiveCollection\$label.

◆ getObjectives()

ILIAS\Setup\ObjectiveCollection::getObjectives ( )
Returns
Objective[]

Definition at line 46 of file ObjectiveCollection.php.

46 : array
47 {
48 return $this->objectives;
49 }

References ILIAS\Setup\ObjectiveCollection\$objectives.

◆ getPreconditions()

ILIAS\Setup\ObjectiveCollection::getPreconditions ( Environment  $environment)

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 87 of file ObjectiveCollection.php.

87 : array
88 {
89 return $this->objectives;
90 }

References ILIAS\Setup\ObjectiveCollection\$objectives.

◆ isApplicable()

ILIAS\Setup\ObjectiveCollection::isApplicable ( Environment  $environment)

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 103 of file ObjectiveCollection.php.

103 : bool
104 {
105 return false;
106 }

◆ isNotable()

ILIAS\Setup\ObjectiveCollection::isNotable ( )

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 79 of file ObjectiveCollection.php.

79 : bool
80 {
81 return $this->is_notable;
82 }

References ILIAS\Setup\ObjectiveCollection\$is_notable.

Field Documentation

◆ $is_notable

bool ILIAS\Setup\ObjectiveCollection::$is_notable
protected

◆ $label

string ILIAS\Setup\ObjectiveCollection::$label
protected

◆ $objectives

array ILIAS\Setup\ObjectiveCollection::$objectives
protected

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