diff --git a/components/ILIAS/Component/src/Activities/Activity.php b/components/ILIAS/Component/src/Activities/Activity.php index 1baf108fd747..d74cb4b16658 100644 --- a/components/ILIAS/Component/src/Activities/Activity.php +++ b/components/ILIAS/Component/src/Activities/Activity.php @@ -21,10 +21,12 @@ namespace ILIAS\Component\Activities; use ILIAS\Component\Dependencies\Name; -use ILIAS\UI\Component\Input\Control\Form\FormInput; use ILIAS\Data\Result; use ILIAS\Data\Text; use ILIAS\Data\Description; +use ILIAS\UI\Component\Input\Container\Form\FormInput; +use ILIAS\UI\Component\Input\Factory as InputFactory; +use ILIAS\UI\Component\Input\Field\Factory as FieldFactory; /** * An Activity is an action on the domain layer action of a component. @@ -46,7 +48,7 @@ public function getType(): ActivityType; public function getDescription(): Text\SimpleDocumentMarkdown; - public function getInputDescription(): FormInput; // might better be ILIAS/UI/Input/Input, but we would need to promote many properties there before. + public function getInputDescription(FieldFactory $f): FormInput; // might better be ILIAS/UI/Input/Input, but we would need to promote many properties there before. public function getOutputDescription(Description\Factory $f): Description\Description; @@ -76,5 +78,5 @@ public function perform(mixed $parameters): mixed; * 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. */ - public function maybePerformAs(int $usr_id, array $raw_parameters): Result; + public function maybePerformAs(InputFactory $input_factory, int $usr_id, array $raw_parameters): Result; } diff --git a/components/ILIAS/Component/src/Activities/ObjectActivity.php b/components/ILIAS/Component/src/Activities/ObjectActivity.php new file mode 100644 index 000000000000..15186026cbd0 --- /dev/null +++ b/components/ILIAS/Component/src/Activities/ObjectActivity.php @@ -0,0 +1,60 @@ + where keys are the name + * @return \Iterator where keys are the name */ public function getActivitiesByName(string $name_matcher, ?ActivityType $type = null, ?Range $range = null): \Iterator; } diff --git a/components/ILIAS/Component/src/Activities/StaticRepository.php b/components/ILIAS/Component/src/Activities/StaticRepository.php index 4e094fc7798f..ec08aa6e62e7 100644 --- a/components/ILIAS/Component/src/Activities/StaticRepository.php +++ b/components/ILIAS/Component/src/Activities/StaticRepository.php @@ -20,6 +20,8 @@ namespace ILIAS\Component\Activities; +use ILIAS\Data\Range; + class StaticRepository implements Repository { protected array $activities = []; diff --git a/components/ILIAS/Setup/src/Activities/GetStatus.php b/components/ILIAS/Setup/src/Activities/GetStatus.php index 6c6728d064d1..136d6e5ffe4d 100644 --- a/components/ILIAS/Setup/src/Activities/GetStatus.php +++ b/components/ILIAS/Setup/src/Activities/GetStatus.php @@ -20,10 +20,12 @@ namespace ILIAS\Setup\Activities; -use ILIAS\Component\Dependencies\Name; -use ILIAS\UI\Component\Input\Control\Form\FormInput; use ILIAS\Data\Result; use ILIAS\Data\Text; +use ILIAS\Data\Description; +use ILIAS\UI\Component\Input\Container\Form\FormInput; +use ILIAS\UI\Component\Input\Factory as InputFactory; +use ILIAS\UI\Component\Input\Field\Factory as FieldFactory; /** * This is a stub... @@ -34,11 +36,11 @@ public function getDescription(): Text\SimpleDocumentMarkdown { } - public function getInputDescription(): \ILIAS\UI\Component\Input\Control\Form\FormInput + public function getInputDescription(FieldFactory $f): FormInput { } - public function getOutputDescription(\ILIAS\Data\Description\Factory $f): \ILIAS\Data\Description\Description + public function getOutputDescription(Description\Factory $f): Description\Description { } @@ -50,7 +52,7 @@ public function perform(mixed $parameters): mixed { } - public function maybePerformAs(int $usr_id, array $raw_parameters): Result + public function maybePerformAs(InputFactory $input_factory, int $usr_id, array $raw_parameters): Result { } }