ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Activity.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\UI\Component\Input\Control\Form\FormInput;
28
38interface Activity
39{
43 public function getName(): Name;
44
45 public function getType(): ActivityType;
46
48
49 public function getInputDescription(): FormInput; // might better be ILIAS/UI/Input/Input, but we would need to promote many properties there before.
50
52
62 public function isAllowedToPerform(int $usr_id, mixed $parameters): bool;
63
72 public function perform(mixed $parameters): mixed;
73
79 public function maybePerformAs(int $usr_id, array $raw_parameters): Result;
80}
This describes some datastructure in terms of standard data structures such as primitives,...
Definition: Description.php:33
An Activity is an action on the domain layer action of a component.
Definition: Activity.php:39
maybePerformAs(int $usr_id, array $raw_parameters)
Grinds the $raw_parameters through the input description, checks if the users is allowed to perform t...
getName()
Shall return classname of the Activity, wrapped in Name.
perform(mixed $parameters)
This shall perform the activity.
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...
A result encapsulates a value or an error and simplifies the handling of those.
Definition: Result.php:29