Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/ILIAS/UI/src/Component/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getCanonicalName(): string;
/**
* The scheme starts at the leaves of the structure and applies the function
* to each leave and moves up the tree recursively.
* @param Closure(Component, array): mixed $fn
* @param \Closure(Component, array): mixed $fn
*/
public function reduceWith(\Closure $fn): mixed;

Expand Down
9 changes: 9 additions & 0 deletions components/ILIAS/UI/src/Component/Input/Field/Numeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
*/
interface Numeric extends FilterInput
{
/**
* Returns the step size used for this numeric input field.
* This value specifies the step size used when incrementing or decrementing the field's value
* via arrow controls, or during validation checks.
*
* @return int|float The configured step size of the input field.
*/
public function getStepSize(): int|float;

/**
* This will not only set the steps for the input's arrow controls,
* but will also alter the field's transformation.
Expand Down
11 changes: 11 additions & 0 deletions components/ILIAS/UI/src/Component/Input/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ public function withValue($value);
*/
public function withAdditionalTransformation(Transformation $trafo);

/**
* Retrieves the dedicated name for this input component.
* This name, if set via {@see Input::withDedicatedName(string $dedicated_name)},
* is used in the NAME attribute of the rendered input (instead of the auto-generated 'input_x').
* If no dedicated name was set, it returns null.
* The dedicated name can be useful for customizing how inputs are submitted or referenced programmatically.
*
* @return string|null The optional dedicated name assigned to this input, or null if none is set.
*/
public function getDedicatedName(): ?string;

/**
* Sets an optional dedicated name for this input which is used in the NAME
* attribute of the rendered input (instead of the auto-generated 'input_x').
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ protected function inputMock()
->getMockBuilder(Input\Field\FormInputInternal::class)
->onlyMethods([
"getName",
"getDedicatedName",
"withDedicatedName",
"withNameFrom",
"withInput",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ protected function inputMock()
->getMockBuilder(Input\Field\FormInputInternal::class)
->onlyMethods([
"getName",
"getDedicatedName",
"withDedicatedName",
"withNameFrom",
"withInput",
Expand Down
Loading