ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
Activity.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28use ILIAS\UI\Component\Input\Factory as InputFactory;
30
40interface Activity
41{
45 public function getName(): Name;
46
47 public function getType(): ActivityType;
48
50
51 public function getInputDescription(FieldFactory $f): FormInput; // might better be ILIAS/UI/Input/Input, but we would need to promote many properties there before.
52
54
64 public function isAllowedToPerform(int $usr_id, mixed $parameters): bool;
65
74 public function perform(mixed $parameters): mixed;
75
81 public function maybePerformAs(InputFactory $input_factory, int $usr_id, array $raw_parameters): Result;
82}
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:41
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...
maybePerformAs(InputFactory $input_factory, int $usr_id, array $raw_parameters)
Grinds the $raw_parameters through the input description, checks if the users is allowed to perform t...
A result encapsulates a value or an error and simplifies the handling of those.
Definition: Result.php:29
This describes inputs that can be used in forms.
Definition: FormInput.php:33
This is how a factory for inputs looks like.
Definition: Factory.php:27
This is what a factory for input fields looks like.
Definition: Factory.php:31