ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BaseConditionFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
30use ILIAS\MetaData\Editor\Full\Services\Inputs\WithoutConditions\InputHelper;
31
33{
34 use InputHelper;
35
36 protected UIFactory $ui_factory;
38 protected ConstraintDictionary $constraint_dictionary;
40
41 public function __construct(
42 UIFactory $ui_factory,
44 ConstraintDictionary $constraint_dictionary,
46 ) {
47 $this->ui_factory = $ui_factory;
48 $this->presenter = $presenter;
49 $this->constraint_dictionary = $constraint_dictionary;
50 $this->types = $types;
51 }
52
53 abstract public function getConditionInput(
54 ElementInterface $element,
55 ElementInterface $context_element,
56 ElementInterface $conditional_element
57 ): FormInput;
58
59 protected function getInputInCondition(
60 ElementInterface $element,
61 ElementInterface $context_element,
62 SlotIdentifier $conditional_slot
63 ): FormInput {
64 $input_factory = $this->types->factory($element->getDefinition()->dataType());
65 return $input_factory->getInputInCondition(
66 $element,
67 $context_element,
68 $conditional_slot
69 );
70 }
71}
factory()
getConditionInput(ElementInterface $element, ElementInterface $context_element, ElementInterface $conditional_element)
getInputInCondition(ElementInterface $element, ElementInterface $context_element, SlotIdentifier $conditional_slot)
__construct(UIFactory $ui_factory, PresenterInterface $presenter, ConstraintDictionary $constraint_dictionary, FactoryWithoutConditionTypesService $types)
This describes inputs that can be used in forms.
Definition: FormInput.php:33
This is what a factory for input fields looks like.
Definition: Factory.php:31