ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Setup\Objective\AdminConfirmedObjective Class Reference

An admin needs to confirm something to achieve this objective. More...

+ Inheritance diagram for ILIAS\Setup\Objective\AdminConfirmedObjective:
+ Collaboration diagram for ILIAS\Setup\Objective\AdminConfirmedObjective:

Public Member Functions

 __construct (string $message)
 
 getHash ()
 Get a hash for this objective.The hash of two objectives must be the same, if they are the same objective, with the same config on the same environment, i.e. if the one is achieved the other is achieved as well because they are the same. 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 (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 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 $message
 

Detailed Description

An admin needs to confirm something to achieve this objective.

Definition at line 28 of file AdminConfirmedObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\Objective\AdminConfirmedObjective::__construct ( string  $message)

Member Function Documentation

◆ achieve()

ILIAS\Setup\Objective\AdminConfirmedObjective::achieve ( Setup\Environment  $environment)

Definition at line 75 of file AdminConfirmedObjective.php.

References ILIAS\Setup\Environment\getResource(), and ILIAS\Setup\Environment\RESOURCE_ADMIN_INTERACTION.

75  : Setup\Environment
76  {
77  $admin_interaction = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
78 
79  if (!$admin_interaction->confirmOrDeny($this->message)) {
80  throw new Setup\NoConfirmationException(
81  $this->message
82  );
83  }
84 
85  return $environment;
86  }
+ Here is the call graph for this function:

◆ getHash()

ILIAS\Setup\Objective\AdminConfirmedObjective::getHash ( )

Get a hash for this objective.The hash of two objectives must be the same, if they are the same objective, with the same config on the same environment, i.e. if the one is achieved the other is achieved as well because they are the same.

Implements ILIAS\Setup\Objective.

Definition at line 40 of file AdminConfirmedObjective.php.

40  : string
41  {
42  return hash(
43  "sha256",
44  get_class($this) . "::" . $this->message
45  );
46  }

◆ getLabel()

ILIAS\Setup\Objective\AdminConfirmedObjective::getLabel ( )

Get a label that describes this objective.

Implements ILIAS\Setup\Objective.

Definition at line 51 of file AdminConfirmedObjective.php.

51  : string
52  {
53  return "Get a confirmation from admin.";
54  }

◆ getPreconditions()

ILIAS\Setup\Objective\AdminConfirmedObjective::getPreconditions ( Setup\Environment  $environment)

Definition at line 67 of file AdminConfirmedObjective.php.

67  : array
68  {
69  return [];
70  }

◆ isApplicable()

ILIAS\Setup\Objective\AdminConfirmedObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 91 of file AdminConfirmedObjective.php.

91  : bool
92  {
93  return true;
94  }

◆ isNotable()

ILIAS\Setup\Objective\AdminConfirmedObjective::isNotable ( )

Get to know if this is an interesting objective for a human.

Implements ILIAS\Setup\Objective.

Definition at line 59 of file AdminConfirmedObjective.php.

59  : bool
60  {
61  return false;
62  }

Field Documentation

◆ $message

string ILIAS\Setup\Objective\AdminConfirmedObjective::$message
protected

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