ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
|
An Activity is an action on the domain layer action of a component. More...
Public Member Functions | |
getName () | |
Shall return classname of the Activity, wrapped in Name. More... | |
getType () | |
getDescription () | |
getInputDescription () | |
getOutputDescription (Description\Factory $f) | |
isAllowedToPerform (int $usr_id, mixed $parameters) | |
This shall check if the given user is allowed to perform the activity based on business rules of this component. More... | |
perform (mixed $parameters) | |
This shall perform the activity. More... | |
maybePerformAs (int $usr_id, array $raw_parameters) | |
Grinds the $raw_parameters through the input description, checks if the users is allowed to perform the action as requested and, if so, then attempts to performs it. More... | |
An Activity is an action on the domain layer action of a component.
This defines the interface to any activity. When implementing Activities, you should use one of these base classes:
Definition at line 38 of file Activity.php.
ILIAS\Component\Activities\Activity::getDescription | ( | ) |
Implemented in ILIAS\Setup\Activities\GetStatus.
ILIAS\Component\Activities\Activity::getInputDescription | ( | ) |
Implemented in ILIAS\Setup\Activities\GetStatus.
ILIAS\Component\Activities\Activity::getName | ( | ) |
Shall return classname of the Activity, wrapped in Name.
Implemented in ILIAS\Component\Activities\ActivityImpl.
ILIAS\Component\Activities\Activity::getOutputDescription | ( | Description\Factory | $f | ) |
ILIAS\Component\Activities\Activity::getType | ( | ) |
Implemented in ILIAS\Component\Activities\Query.
ILIAS\Component\Activities\Activity::isAllowedToPerform | ( | int | $usr_id, |
mixed | $parameters | ||
) |
This shall check if the given user is allowed to perform the activity based on business rules of this component.
This shall, for example, check if the given user may add this other user to a course based on RBAC and position permissions, but this shall not check overall business rules such as: root may do everything. This shall not cause any observable side effects.
mixed | $parameters | whatever the FormInput from getInputDescription produces. |
Implemented in ILIAS\Setup\Activities\GetStatus.
ILIAS\Component\Activities\Activity::maybePerformAs | ( | int | $usr_id, |
array | $raw_parameters | ||
) |
Grinds the $raw_parameters through the input description, checks if the users is allowed to perform the action as requested and, if so, then attempts to performs it.
Wraps the result and possible errors in the Result
type.
Implemented in ILIAS\Setup\Activities\GetStatus.
ILIAS\Component\Activities\Activity::perform | ( | mixed | $parameters | ) |
This shall perform the activity.
This shall not check if a user is allowed to perform the activity. The returned data should match the Description given by getOutputDescription
.
any | SPL Exception (https://www.php.net/manual/en/spl.exceptions.php) |
mixed | $parameters | whatever the FormInput from getInputDescription produces. |
Implemented in ILIAS\Setup\Activities\GetStatus.