From bd1ec69d46df058b7bc7277beaaa725bdeef9aea Mon Sep 17 00:00:00 2001 From: Richard Klees Date: Tue, 17 Dec 2024 16:11:35 +0100 Subject: [PATCH] UI: add Input\Container::withInputData for awesome flexibility --- .../UI/src/Component/Input/Container/Container.php | 13 +++++++++++++ .../Component/Input/InputData.php | 2 +- .../Component/Dropzone/File/File.php | 6 ++++++ .../Component/Input/ArrayInputData.php | 1 + .../Component/Input/Container/Container.php | 7 ++++++- .../Component/Input/Container/Filter/Filter.php | 3 ++- .../Component/Input/Container/Form/Form.php | 2 +- .../Input/Container/ViewControl/ViewControl.php | 7 +++---- .../Component/Input/DynamicInputDataIterator.php | 1 + .../Component/Input/Field/Checkbox.php | 2 +- .../Component/Input/Field/FormInput.php | 2 +- .../Component/Input/Field/HasDynamicInputsBase.php | 2 +- .../Component/Input/Field/OptionalGroup.php | 2 +- .../Implementation/Component/Input/Field/Radio.php | 2 +- .../Component/Input/Field/SwitchableGroup.php | 2 +- .../Implementation/Component/Input/Field/Tag.php | 2 +- .../src/Implementation/Component/Input/Group.php | 1 + .../src/Implementation/Component/Input/Input.php | 2 +- .../Component/Input/InputInternal.php | 2 +- .../Component/Input/PostDataFromServerRequest.php | 1 + .../Input/QueryParamsFromServerRequest.php | 2 +- .../Component/Input/StackedInputData.php | 14 +++++++------- .../Component/Input/ViewControl/GroupDecorator.php | 2 +- .../Implementation/Component/Modal/RoundTrip.php | 6 ++++++ .../Input/Container/Filter/FilterTest.php | 8 ++++---- .../Component/Input/Container/Form/FormTest.php | 8 ++++---- .../Input/DynamicInputDataIteratorTest.php | 2 +- .../Component/Input/Field/CheckboxInputTest.php | 2 +- .../tests/Component/Input/Field/GroupInputTest.php | 2 +- .../UI/tests/Component/Input/Field/InputTest.php | 2 +- .../tests/Component/Input/Field/LinkInputTest.php | 2 +- .../Component/Input/Field/MultiSelectInputTest.php | 2 +- .../Input/Field/OptionalGroupInputTest.php | 2 +- .../Component/Input/Field/PasswordInputTest.php | 2 +- .../Component/Input/Field/SelectInputTest.php | 2 +- .../Input/Field/SwitchableGroupInputTest.php | 2 +- .../ViewControl/ViewControlFieldSelectionTest.php | 2 +- .../Input/ViewControl/ViewControlGroupTest.php | 2 +- .../ViewControl/ViewControlInputGenericTest.php | 2 +- .../Input/ViewControl/ViewControlNullTest.php | 2 +- .../ViewControl/ViewControlPaginationTest.php | 2 +- .../Input/ViewControl/ViewControlSortationTest.php | 2 +- 42 files changed, 84 insertions(+), 50 deletions(-) rename components/ILIAS/UI/src/{Implementation => }/Component/Input/InputData.php (96%) diff --git a/components/ILIAS/UI/src/Component/Input/Container/Container.php b/components/ILIAS/UI/src/Component/Input/Container/Container.php index 63701c479a52..d4e7ba078552 100755 --- a/components/ILIAS/UI/src/Component/Input/Container/Container.php +++ b/components/ILIAS/UI/src/Component/Input/Container/Container.php @@ -24,6 +24,7 @@ use ILIAS\Refinery\Transformation; use Psr\Http\Message\ServerRequestInterface; use ILIAS\UI\Component\Input\Input; +use ILIAS\UI\Component\Input\InputData; /** * This describes commonalities between all Containers for Inputs, such as Forms. @@ -40,10 +41,22 @@ public function getInputs(): array; /** * Get a form like this where data from the request is attached. * + * This calls `withInputData` with a properly wrapped request. + * * @return static */ public function withRequest(ServerRequestInterface $request): self; + /** + * Get a form like this where some input data is attached. + * + * This is a more powerful version of `withRequest` that allows to provide + * data from arbitrary to the form. This is one piece that turns the inputs + * from the UI framework into a truly generic input description that can be + * used in various contexts. + */ + public function withInputData(InputData $input_data): self; + /** * Apply a transformation to the data of the form. */ diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/InputData.php b/components/ILIAS/UI/src/Component/Input/InputData.php similarity index 96% rename from components/ILIAS/UI/src/Implementation/Component/Input/InputData.php rename to components/ILIAS/UI/src/Component/Input/InputData.php index 3ee02b9bb3ad..a3e5d7d38ed7 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/InputData.php +++ b/components/ILIAS/UI/src/Component/Input/InputData.php @@ -18,7 +18,7 @@ declare(strict_types=1); -namespace ILIAS\UI\Implementation\Component\Input; +namespace ILIAS\UI\Component\Input; use LogicException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Dropzone/File/File.php b/components/ILIAS/UI/src/Implementation/Component/Dropzone/File/File.php index 452f0e916a20..2ab600bf5adc 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Dropzone/File/File.php +++ b/components/ILIAS/UI/src/Implementation/Component/Dropzone/File/File.php @@ -33,6 +33,7 @@ use Psr\Http\Message\ServerRequestInterface; use ILIAS\UI\Component\ReplaceSignal; use ILIAS\UI\Component\Input\Container\Form\FormInput; +use ILIAS\UI\Component\Input\InputData; /** * @author Thibeau Fuhrer @@ -218,6 +219,11 @@ public function withRequest(ServerRequestInterface $request): self return $clone; } + public function withInputData(InputData $input_data): self + { + throw new \LogicException("ToDo: Implement me!"); + } + public function withAdditionalTransformation(Transformation $trafo): self { $clone = clone $this; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/ArrayInputData.php b/components/ILIAS/UI/src/Implementation/Component/Input/ArrayInputData.php index 763cbdf91246..851203642e45 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/ArrayInputData.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/ArrayInputData.php @@ -21,6 +21,7 @@ namespace ILIAS\UI\Implementation\Component\Input; use LogicException; +use ILIAS\UI\Component\Input\InputData; /** * @author Thibeau Fuhrer diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Container.php b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Container.php index 313f0b5163b4..57cfb4672e21 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Container.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Container.php @@ -23,7 +23,7 @@ use ILIAS\UI\Component as C; use ILIAS\UI\Implementation\Component as CI; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Refinery\Transformation; use Psr\Http\Message\ServerRequestInterface; use ILIAS\Data\Result; @@ -76,6 +76,11 @@ public function withRequest(ServerRequestInterface $request): self return $clone; } + public function withInputData(InputData $input_data): self + { + throw new \LogicException("ToDo: Implement me!"); + } + /** * @inheritdoc */ diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Filter/Filter.php b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Filter/Filter.php index 6981fbe88889..b13c663df76e 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Filter/Filter.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Filter/Filter.php @@ -27,6 +27,7 @@ use ILIAS\UI\Implementation\Component\JavaScriptBindable; use Psr\Http\Message\ServerRequestInterface; use ILIAS\UI\Implementation\Component\Input\QueryParamsFromServerRequest; +use ILIAS\UI\Component\Input\InputData; /** * This implements commonalities between all Filters. @@ -243,7 +244,7 @@ public function getData() /** * Extract post data from request. */ - protected function extractParamData(ServerRequestInterface $request): CI\Input\InputData + protected function extractParamData(ServerRequestInterface $request): InputData { return new QueryParamsFromServerRequest($request); } diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Form/Form.php b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Form/Form.php index 196f8998842e..95c0f4001b03 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Container/Form/Form.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Container/Form/Form.php @@ -22,7 +22,7 @@ use ILIAS\UI\Implementation\Component\Input\Container\Container; use ILIAS\UI\Component as C; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use Psr\Http\Message\ServerRequestInterface; use ILIAS\UI\Implementation\Component\Input\PostDataFromServerRequest; use ILIAS\UI\Implementation\Component\Input\NameSource; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Container/ViewControl/ViewControl.php b/components/ILIAS/UI/src/Implementation/Component/Input/Container/ViewControl/ViewControl.php index 2d13bb2542c0..3345fce59542 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Container/ViewControl/ViewControl.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Container/ViewControl/ViewControl.php @@ -31,11 +31,10 @@ use ILIAS\Data\Factory as DataFactory; use ILIAS\Data\Result; use ILIAS\Refinery\Transformation; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\StackedInputData; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Component as C; - use ILIAS\UI\Implementation\Component\Input\ViewControl\HasInputGroup; abstract class ViewControl extends Container implements I\ViewControl @@ -109,7 +108,7 @@ public function getComponentInternalValues( C\Input\Group $component = null, array $input_values = [] ): array { - if(is_null($component)) { + if (is_null($component)) { $component = $this->getInputGroup(); } foreach ($component->getInputs() as $input) { @@ -119,7 +118,7 @@ public function getComponentInternalValues( if ($input instanceof HasInputGroup) { $input_values = $this->getComponentInternalValues($input->getInputGroup(), $input_values); } - if($name = $input->getName()) { + if ($name = $input->getName()) { $input_values[$input->getName()] = $input->getValue(); } } diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/DynamicInputDataIterator.php b/components/ILIAS/UI/src/Implementation/Component/Input/DynamicInputDataIterator.php index 4d53d8c16a21..1be792cb272e 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/DynamicInputDataIterator.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/DynamicInputDataIterator.php @@ -21,6 +21,7 @@ namespace ILIAS\UI\Implementation\Component\Input; use Iterator; +use ILIAS\UI\Component\Input\InputData; /** * @author Thibeau Fuhrer diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Checkbox.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Checkbox.php index 6bae567607d8..ef934aac411a 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Checkbox.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Checkbox.php @@ -23,7 +23,7 @@ use ILIAS\UI\Component as C; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Refinery\Constraint; use Closure; use LogicException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/FormInput.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/FormInput.php index 12b0413b6d3b..7c34ef15f031 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/FormInput.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/FormInput.php @@ -27,7 +27,7 @@ use ILIAS\UI\Component\Signal; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data\Result; use Generator; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/HasDynamicInputsBase.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/HasDynamicInputsBase.php index bd830ad8296a..d7221f00efe1 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/HasDynamicInputsBase.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/HasDynamicInputsBase.php @@ -23,7 +23,7 @@ use ILIAS\UI\Implementation\Component\Input\DynamicInputDataIterator; use ILIAS\UI\Implementation\Component\Input\DynamicInputsNameSource; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Input\Container\Form\FormInput as FormInputInterface; use ILIAS\UI\Component\Input\Field\HasDynamicInputs; use ILIAS\Refinery\Factory as Refinery; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/OptionalGroup.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/OptionalGroup.php index d34a7121367e..83afbbf3f40f 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/OptionalGroup.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/OptionalGroup.php @@ -22,7 +22,7 @@ use ILIAS\Refinery\Constraint; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Input\Field as I; use LogicException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Radio.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Radio.php index 99b947506307..ef6d2c4890c1 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Radio.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Radio.php @@ -21,7 +21,7 @@ namespace ILIAS\UI\Implementation\Component\Input\Field; use ILIAS\UI\Component as C; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; use ILIAS\Refinery\Constraint; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/SwitchableGroup.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/SwitchableGroup.php index e54019e9e00d..084f099929e4 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/SwitchableGroup.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/SwitchableGroup.php @@ -24,7 +24,7 @@ use ILIAS\Refinery\Constraint; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Input\Field as I; use ILIAS\Language\Language; use LogicException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Tag.php b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Tag.php index a05f6aed31ed..a9aeb9607343 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Field/Tag.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Field/Tag.php @@ -24,7 +24,7 @@ use ILIAS\Data\Result\Ok; use ILIAS\UI\Component as C; use ILIAS\UI\Component\Signal; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use stdClass; use ILIAS\Refinery\Constraint; use InvalidArgumentException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Group.php b/components/ILIAS/UI/src/Implementation/Component/Input/Group.php index 7e0fe1ae5e8c..edb5901b9e5b 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Group.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Group.php @@ -26,6 +26,7 @@ use ILIAS\Data\Result; use ILIAS\Data\Result\Ok; use ILIAS\Language\Language; +use ILIAS\UI\Component\Input\InputData; /** * @author Thibeau Fuhrer diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/Input.php b/components/ILIAS/UI/src/Implementation/Component/Input/Input.php index f60190800d77..11a417405f70 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/Input.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/Input.php @@ -27,7 +27,7 @@ use ILIAS\Refinery\Transformation; use ILIAS\UI\Component\Signal; use ILIAS\UI\Implementation\Component\ComponentHelper; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\NameSource; use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\Triggerer; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/InputInternal.php b/components/ILIAS/UI/src/Implementation/Component/Input/InputInternal.php index 4a67c7b1310d..41e69b9a5da2 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/InputInternal.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/InputInternal.php @@ -20,7 +20,7 @@ namespace ILIAS\UI\Implementation\Component\Input; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Input\Input; use ILIAS\Data\Result; use ILIAS\UI\Implementation\Component\Input\NameSource; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/PostDataFromServerRequest.php b/components/ILIAS/UI/src/Implementation/Component/Input/PostDataFromServerRequest.php index e94bc85daf82..f55bcefa5a15 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/PostDataFromServerRequest.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/PostDataFromServerRequest.php @@ -22,6 +22,7 @@ use Psr\Http\Message\ServerRequestInterface; use LogicException; +use ILIAS\UI\Component\Input\InputData; /** * Implements interaction of input element with post data from diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/QueryParamsFromServerRequest.php b/components/ILIAS/UI/src/Implementation/Component/Input/QueryParamsFromServerRequest.php index 41c9aa70751a..09fde6d718ff 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/QueryParamsFromServerRequest.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/QueryParamsFromServerRequest.php @@ -20,7 +20,7 @@ namespace ILIAS\UI\Implementation\Component\Input; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use Psr\Http\Message\ServerRequestInterface; use LogicException; diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/StackedInputData.php b/components/ILIAS/UI/src/Implementation/Component/Input/StackedInputData.php index 4fae6cb5733f..fe702f7fe081 100644 --- a/components/ILIAS/UI/src/Implementation/Component/Input/StackedInputData.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/StackedInputData.php @@ -20,7 +20,7 @@ namespace ILIAS\UI\Implementation\Component\Input; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use Psr\Http\Message\ServerRequestInterface; use LogicException; @@ -43,8 +43,8 @@ public function __construct(InputData ...$stack) public function get(string $name) { - foreach($this->stack as $input) { - if($input->has($name)) { + foreach ($this->stack as $input) { + if ($input->has($name)) { return $input->get($name); } } @@ -53,8 +53,8 @@ public function get(string $name) public function getOr(string $name, $default) { - foreach($this->stack as $input) { - if($input->has($name)) { + foreach ($this->stack as $input) { + if ($input->has($name)) { return $input->get($name); } } @@ -63,8 +63,8 @@ public function getOr(string $name, $default) public function has($name): bool { - foreach($this->stack as $input) { - if($input->has($name)) { + foreach ($this->stack as $input) { + if ($input->has($name)) { return true; } } diff --git a/components/ILIAS/UI/src/Implementation/Component/Input/ViewControl/GroupDecorator.php b/components/ILIAS/UI/src/Implementation/Component/Input/ViewControl/GroupDecorator.php index 8561c3bc2855..b0b8e5a0166b 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Input/ViewControl/GroupDecorator.php +++ b/components/ILIAS/UI/src/Implementation/Component/Input/ViewControl/GroupDecorator.php @@ -22,7 +22,7 @@ use ILIAS\UI\Component\Input\Group; use ILIAS\Refinery\Transformation; use ILIAS\Data\Result; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\NameSource; /** diff --git a/components/ILIAS/UI/src/Implementation/Component/Modal/RoundTrip.php b/components/ILIAS/UI/src/Implementation/Component/Modal/RoundTrip.php index e82a25b4f7ff..11b1bdfbe993 100755 --- a/components/ILIAS/UI/src/Implementation/Component/Modal/RoundTrip.php +++ b/components/ILIAS/UI/src/Implementation/Component/Modal/RoundTrip.php @@ -26,6 +26,7 @@ use ILIAS\UI\Implementation\Component\ReplaceSignal; use ILIAS\UI\Component\Input\Field\Factory as FieldFactory; use ILIAS\UI\Component\Input\Container\Form\FormInput; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Component; use ILIAS\UI\Component\Button; use ILIAS\UI\Component\Signal; @@ -182,6 +183,11 @@ public function withRequest(ServerRequestInterface $request): self return $clone; } + public function withInputData(InputData $input_data): self + { + throw new \LogicException("ToDo: Implement me!"); + } + /** * @inheritdoc */ diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterTest.php index 89555946ad71..726ffe94ca77 100755 --- a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterTest.php @@ -24,7 +24,7 @@ use ILIAS\UI\Implementation\Component\Input; use ILIAS\UI\Component\Input\Container\Filter\FilterInput; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\Container\Filter\Filter; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\Data; @@ -45,7 +45,7 @@ public function getNewName(): string class ConcreteFilter extends Filter { public array $inputs; - public ?Input\InputData $input_data = null; + public ?InputData $input_data = null; protected Input\Field\Factory $input_factory; protected Group $input_group; @@ -80,12 +80,12 @@ public function __construct( ); } - public function _extractParamData(ServerRequestInterface $request): Input\InputData + public function _extractParamData(ServerRequestInterface $request): InputData { return $this->extractParamData($request); } - public function extractParamData(ServerRequestInterface $request): Input\InputData + public function extractParamData(ServerRequestInterface $request): InputData { if ($this->input_data !== null) { return $this->input_data; diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Form/FormTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Form/FormTest.php index 967eb9e5657c..1de73184b9f5 100755 --- a/components/ILIAS/UI/tests/Component/Input/Container/Form/FormTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Form/FormTest.php @@ -24,7 +24,7 @@ use ILIAS\UI\Implementation\Component\Input; use ILIAS\UI\Component\Input\Container\Form\FormInput; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\Container\Form\Form; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\Data; @@ -46,7 +46,7 @@ public function getNewName(): string class ConcreteForm extends Form { - public ?Input\InputData $input_data = null; + public ?InputData $input_data = null; protected Input\Field\Factory $input_factory; protected Group $input_group; protected array $inputs; @@ -57,12 +57,12 @@ public function __construct(Input\Field\Factory $input_factory, NameSource $name parent::__construct($input_factory, $name_source, $inputs); } - public function _extractRequestData(ServerRequestInterface $request): Input\InputData + public function _extractRequestData(ServerRequestInterface $request): InputData { return $this->extractRequestData($request); } - public function extractRequestData(ServerRequestInterface $request): Input\InputData + public function extractRequestData(ServerRequestInterface $request): InputData { if ($this->input_data !== null) { return $this->input_data; diff --git a/components/ILIAS/UI/tests/Component/Input/DynamicInputDataIteratorTest.php b/components/ILIAS/UI/tests/Component/Input/DynamicInputDataIteratorTest.php index b32ab3b20d8e..71c26f084bcc 100755 --- a/components/ILIAS/UI/tests/Component/Input/DynamicInputDataIteratorTest.php +++ b/components/ILIAS/UI/tests/Component/Input/DynamicInputDataIteratorTest.php @@ -21,7 +21,7 @@ namespace ILIAS\Tests\UI\Component\Input; use ILIAS\UI\Implementation\Component\Input\DynamicInputDataIterator; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use PHPUnit\Framework\TestCase; use LogicException; use ILIAS\UI\Implementation\Component\Input\DynamicInputsNameSource; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php index 0a90fc8a220b..490b585b1f6f 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php @@ -23,7 +23,7 @@ require_once(__DIR__ . "/InputTest.php"); require_once(__DIR__ . "/CommonFieldRendering.php"); -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Component\Input\Field; use ILIAS\Refinery\Factory as Refinery; use ILIAS\Data; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php index ebddc0212db7..4e88da38b374 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php @@ -26,7 +26,7 @@ use ILIAS\UI\Implementation\Component\Input\Field\FormInput; use ILIAS\UI\Implementation\Component\Input\Field\Factory as FieldFactory; use ILIAS\UI\Implementation\Component\Input\Field\Group; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use PHPUnit\Framework\MockObject\MockObject; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php index 6db887420c31..11f7ad9ed4e6 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php @@ -23,7 +23,7 @@ use ILIAS\UI\Implementation\Component\Input\Field\FormInput; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data\Factory as DataFactory; use ILIAS\Data\Result; use ILIAS\Refinery\Constraint; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php index 477a2085eab8..9b58f2a87b08 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php @@ -28,7 +28,7 @@ use ILIAS\Data; use ILIAS\UI\Implementation\Component\Input\Field\Factory; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; class LinkInputTest extends ILIAS_UI_TestBase { diff --git a/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php index b199cac5780e..68616d0bb05b 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php @@ -24,7 +24,7 @@ use ILIAS\UI\Implementation\Component as I; use ILIAS\UI\Implementation\Component\SignalGenerator; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\Input\NameSource; use ILIAS\UI\Component\Input\Field; use ILIAS\Data; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php index ab1d55339414..1541570b5c7a 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php @@ -25,7 +25,7 @@ use ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup; use ILIAS\UI\Implementation\Component\Input\Field\FormInput; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use PHPUnit\Framework\MockObject\MockObject; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php index b599ffda3432..14b741c641d5 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php @@ -25,7 +25,7 @@ use ILIAS\UI\Implementation\Component as I; use ILIAS\UI\Implementation\Component\SignalGenerator; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data\Password as PWD; use ILIAS\UI\Component\Input\Field; use ILIAS\Data; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/SelectInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/SelectInputTest.php index 405fd3809293..1474eb3b70e9 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/SelectInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/SelectInputTest.php @@ -24,7 +24,7 @@ use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Implementation\Component as I; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\UI\Implementation\Component\SignalGenerator; class SelectForTest extends ILIAS\UI\Implementation\Component\Input\Field\Select diff --git a/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php index eafb9c8afb90..0b811659048e 100755 --- a/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php @@ -26,7 +26,7 @@ use ILIAS\UI\Implementation\Component\Input\Field\SwitchableGroup; use ILIAS\UI\Implementation\Component\Input\Field\Group; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\Refinery\Factory as Refinery; diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlFieldSelectionTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlFieldSelectionTest.php index 9432f0405e18..cdfde7e92563 100755 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlFieldSelectionTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlFieldSelectionTest.php @@ -21,7 +21,7 @@ use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Component\Signal; diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlGroupTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlGroupTest.php index a470d3a3caa2..55329b88574a 100644 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlGroupTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlGroupTest.php @@ -23,7 +23,7 @@ use ILIAS\Data\Order; use ILIAS\Data\Range; use ILIAS\Data\Result; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; class ViewControlGroupTest extends ViewControlTestBase { diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlInputGenericTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlInputGenericTest.php index 0eb1ffa92447..f0249f0f4c97 100755 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlInputGenericTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlInputGenericTest.php @@ -21,7 +21,7 @@ use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Component\Signal; diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlNullTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlNullTest.php index 445faa6ad88c..4de9ebc3e06c 100644 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlNullTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlNullTest.php @@ -20,7 +20,7 @@ use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; use ILIAS\Data\Result; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; class ViewControlNullTest extends ViewControlTestBase { diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlPaginationTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlPaginationTest.php index 84f87f087089..29d8301e8f31 100755 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlPaginationTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlPaginationTest.php @@ -21,7 +21,7 @@ use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Component\Signal; diff --git a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlSortationTest.php b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlSortationTest.php index 118431ace515..a434c41735ba 100755 --- a/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlSortationTest.php +++ b/components/ILIAS/UI/tests/Component/Input/ViewControl/ViewControlSortationTest.php @@ -21,7 +21,7 @@ use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Input\NameSource; -use ILIAS\UI\Implementation\Component\Input\InputData; +use ILIAS\UI\Component\Input\InputData; use ILIAS\Data\Order; use ILIAS\Refinery\Factory as Refinery; use ILIAS\UI\Component\Signal;