ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
NonNegIntFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions
;
22
23
use
ILIAS\Refinery\Factory
as
Refinery
;
24
use
ILIAS\UI\Component\Input\Container\Form\FormInput
;
25
use
ILIAS\MetaData\Elements\ElementInterface
;
26
use
ILIAS\UI\Component\Input\Field\Factory
as
UIFactory
;
27
use
ILIAS\MetaData\Repository\Validation\Dictionary\DictionaryInterface
as
ConstraintDictionary
;
28
use
ILIAS\MetaData\Editor\Presenter\PresenterInterface
;
29
30
class
NonNegIntFactory
extends
BaseFactory
31
{
32
protected
Refinery
$refinery
;
33
34
public
function
__construct
(
35
UIFactory
$ui_factory
,
36
PresenterInterface
$presenter
,
37
ConstraintDictionary
$constraint_dictionary
,
38
Refinery
$refinery
39
) {
40
parent::__construct
($ui_factory, $presenter, $constraint_dictionary);
41
$this->
refinery
=
$refinery
;
42
}
43
44
protected
function
rawInput
(
45
ElementInterface
$element,
46
ElementInterface
$context_element,
47
string
$condition_value =
''
48
):
FormInput
{
49
return
$this->ui_factory
50
->numeric(
'placeholder'
)
51
->
withAdditionalTransformation
(
52
$this->
refinery
->int()->isGreaterThanOrEqual(0)
53
)
54
->
withAdditionalTransformation
(
55
$this->
refinery
->byTrying([
56
$this->refinery->kindlyTo()->string(),
57
$this->
refinery
->kindlyTo()->null()
58
])
59
);
60
}
61
}
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\NonNegIntFactory\$refinery
Refinery $refinery
Definition:
NonNegIntFactory.php:32
ILIAS\UI\Component\Input\Field\Factory
This is what a factory for input fields looks like.
Definition:
Factory.php:28
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\NonNegIntFactory\__construct
__construct(UIFactory $ui_factory, PresenterInterface $presenter, ConstraintDictionary $constraint_dictionary, Refinery $refinery)
Definition:
NonNegIntFactory.php:34
DictionaryInterface
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\NonNegIntFactory
Definition:
NonNegIntFactory.php:30
FormInput
Factory
ILIAS\UI\Component\Input\Input\withAdditionalTransformation
withAdditionalTransformation(Transformation $trafo)
Apply a transformation to the content of the input.
ILIAS\Repository\refinery
refinery()
Definition:
trait.GlobalDICDomainServices.php:73
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\BaseFactory
Definition:
BaseFactory.php:33
ILIAS\MetaData\Repository\Validation\Data\__construct
__construct(VocabulariesInterface $vocabularies)
Definition:
VocabularyBridge.php:31
Factory
ILIAS\MetaData\Elements\ElementInterface
Definition:
ElementInterface.php:28
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\BaseFactory\$ui_factory
UIFactory $ui_factory
Definition:
BaseFactory.php:35
ILIAS\UI\Implementation\Component\Input\ViewControl\withAdditionalTransformation
withAdditionalTransformation(Transformation $trafo)
Definition:
GroupDecorator.php:56
ElementInterface
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\NonNegIntFactory\rawInput
rawInput(ElementInterface $element, ElementInterface $context_element, string $condition_value='')
Definition:
NonNegIntFactory.php:44
PresenterInterface
ILIAS\UI\Component\Input\Container\Form\FormInput
This describes inputs that can be used in forms.
Definition:
FormInput.php:31
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\BaseFactory\$presenter
PresenterInterface $presenter
Definition:
BaseFactory.php:36
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\BaseFactory\$constraint_dictionary
ConstraintDictionary $constraint_dictionary
Definition:
BaseFactory.php:37
ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions
Definition:
BaseFactory.php:21
Services
MetaData
classes
Editor
Full
Services
Inputs
WithoutConditions
NonNegIntFactory.php
Generated on Wed Sep 10 2025 14:11:40 for ILIAS by
1.8.13 (using
Doxyfile
)