|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
ALL permissions are copied from the $src_type and all existing permissions are first deleted from $dest_type. More...
Inheritance diagram for ILIAS\Administration\Setup\Objective\CopyPermissions:
Collaboration diagram for ILIAS\Administration\Setup\Objective\CopyPermissions:Public Member Functions | |
| __construct (private string $src_type, private string $dest_type, private array $additional_preconditions) | |
| 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... | |
| 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... | |
Private Member Functions | |
| firstRefIdOfType (ilDBInterface $db, string $type) | |
ALL permissions are copied from the $src_type and all existing permissions are first deleted from $dest_type.
Only rbac_pa is modified.
Definition at line 34 of file CopyPermissions.php.
| ILIAS\Administration\Setup\Objective\CopyPermissions::__construct | ( | private string | $src_type, |
| private string | $dest_type, | ||
| private array | $additional_preconditions | ||
| ) |
| Objective[] | $additional_preconditions |
Definition at line 39 of file CopyPermissions.php.
| ILIAS\Administration\Setup\Objective\CopyPermissions::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.
LogicException if there are unfullfilled preconditions.
RuntimeException if there are missing resources.
Implements ILIAS\Setup\Objective.
Definition at line 63 of file CopyPermissions.php.
References ILIAS\$db, ILIAS\Administration\Setup\Objective\CopyPermissions\firstRefIdOfType(), ILIAS\Setup\Environment\getResource(), ILIAS\Setup\Environment\RESOURCE_DATABASE, and ilDBConstants\T_INTEGER.
Here is the call graph for this function:
|
private |
Definition at line 96 of file CopyPermissions.php.
References ILIAS\$db, and ilDBConstants\T_TEXT.
Referenced by ILIAS\Administration\Setup\Objective\CopyPermissions\achieve(), and ILIAS\Administration\Setup\Objective\CopyPermissions\isApplicable().
Here is the caller graph for this function:| ILIAS\Administration\Setup\Objective\CopyPermissions::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 43 of file CopyPermissions.php.
| ILIAS\Administration\Setup\Objective\CopyPermissions::getLabel | ( | ) |
Get a label that describes this objective.
Implements ILIAS\Setup\Objective.
Definition at line 48 of file CopyPermissions.php.
| ILIAS\Administration\Setup\Objective\CopyPermissions::getPreconditions | ( | Environment | $environment | ) |
Objectives might depend on other objectives.
| UnachievableException | if the objective is not achievable |
Implements ILIAS\Setup\Objective.
Definition at line 58 of file CopyPermissions.php.
| ILIAS\Administration\Setup\Objective\CopyPermissions::isApplicable | ( | Environment | $environment | ) |
Get to know whether the objective is applicable.
Don't change the environment or cause changes on services in the environment. Just check if this objective needs to be achieved, either currently or at all. In case of doubt whether the objective is applicable or not return true.
Implements ILIAS\Setup\Objective.
Definition at line 87 of file CopyPermissions.php.
References ILIAS\$db, ILIAS\Administration\Setup\Objective\CopyPermissions\firstRefIdOfType(), ILIAS\Setup\Environment\getResource(), ILIAS\Setup\Environment\RESOURCE_DATABASE, and ilDBConstants\T_INTEGER.
Here is the call graph for this function:| ILIAS\Administration\Setup\Objective\CopyPermissions::isNotable | ( | ) |
Get to know if this is an interesting objective for a human.
Implements ILIAS\Setup\Objective.
Definition at line 53 of file CopyPermissions.php.