ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\Implementation\Component\Input Namespace Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

Namespaces

namespace  Container
 
namespace  Field
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 
namespace  ViewControl
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
 

Data Structures

class  ArrayInputData
 
class  DynamicInputDataIterator
 
class  DynamicInputsNameSource
 Other than the FormInputNameSource this name source is for inputs that can be dynamically added multiple times on clientside, therefore it must provide a name that is stacked when submitted to the backend. More...
 
class  Factory
 
class  FormInputNameSource
 FormInputNameSource is responsible for generating continuous form input names. More...
 
interface  GroupInternal
 
class  Input
 This implements commonalities between inputs. More...
 
interface  InputInternal
 Describes the interface of inputs that is used for internal processing of data from the client. More...
 
interface  NameSource
 Describes a source for input names. More...
 
class  PostDataFromServerRequest
 Implements interaction of input element with post data from psr-7 server request. More...
 
class  QueryParamsFromServerRequest
 Implements interaction of input element with get data from psr-7 server request. More...
 
class  StackedInputData
 Implements interaction of input element with get data from psr-7 server request. More...
 
class  UploadLimitResolver
 This class will bee used by. More...
 

Functions

 getValue ()
 Get the value that is displayed in the input client side. More...
 
 withValue ($value)
 Get an input like this with another value displayed on the client side. More...
 
 withInput (InputData $input)
 Collects the input, applies trafos and forwards the input to its children and returns a new input group reflecting the inputs with data that was put in. More...
 
 nameInputs (NameSource $source, string $parent_name)
 
 _isClientSideValueOk ($value)
 ATTENTION: This is not the same as. More...
 
 getInputs ()
 
 setInputs (array $inputs)
 This setter should be used instead of accessing $this->inputs directly. More...
 
 applyOperationsTo ($res)
 
 setError (string $error)
 This setter will be used by withInput() to set possible errors. More...
 
 getLanguage ()
 
 getDataFactory ()
 

Variables

trait Group
 
array $inputs = []
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Function Documentation

◆ _isClientSideValueOk()

ILIAS\UI\Implementation\Component\Input\_isClientSideValueOk (   $value)
protected

ATTENTION: This is not the same as.

See also
Input::isClientSideValueOk(), even if it had the same name. These are different symbols, as this trait is not in the hierarchy that defines the original isClientSideValueOk.

Definition at line 131 of file Group.php.

131 : bool
132 {
133 if (!is_array($value)) {
134 return false;
135 }
136 if (count($this->getInputs()) !== count($value)) {
137 return false;
138 }
139 foreach ($this->getInputs() as $key => $input) {
140 if (!array_key_exists($key, $value)) {
141 return false;
142 }
143 if (!$input->isClientSideValueOk($value[$key])) {
144 return false;
145 }
146 }
147 return true;
148 }

References ILIAS\UI\Implementation\Component\Input\getInputs().

Referenced by ILIAS\UI\Implementation\Component\Input\Field\Group\isClientSideValueOk(), and ILIAS\UI\Implementation\Component\Input\ViewControl\Group\isClientSideValueOk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyOperationsTo()

◆ getDataFactory()

◆ getInputs()

◆ getLanguage()

ILIAS\UI\Implementation\Component\Input\getLanguage ( )
abstractprotected

Referenced by ILIAS\UI\Implementation\Component\Input\withInput().

+ Here is the caller graph for this function:

◆ getValue()

◆ nameInputs()

ILIAS\UI\Implementation\Component\Input\nameInputs ( NameSource  $source,
string  $parent_name 
)
protected
Returns
Input[]

Definition at line 116 of file Group.php.

116 : array
117 {
118 $named_inputs = [];
119 foreach ($this->getInputs() as $key => $input) {
120 $named_inputs[$key] = $input->withNameFrom($source, $parent_name);
121 }
122
123 return $named_inputs;
124 }

References ILIAS\UI\Implementation\Component\Input\getInputs().

+ Here is the call graph for this function:

◆ setError()

ILIAS\UI\Implementation\Component\Input\setError ( string  $error)
abstractprotected

This setter will be used by withInput() to set possible errors.

Referenced by ILIAS\UI\Implementation\Component\Input\Input\setAdditionalTransformation().

+ Here is the caller graph for this function:

◆ setInputs()

ILIAS\UI\Implementation\Component\Input\setInputs ( array  $inputs)
protected

This setter should be used instead of accessing $this->inputs directly.

Parameters
\ILIAS\UI\Component\Input\Input[]$inputs

Definition at line 163 of file Group.php.

163 : void
164 {
165 $this->inputs = $inputs;
166 }

References ILIAS\UI\Implementation\Component\Input\$inputs.

Referenced by ILIAS\UI\Implementation\Component\Input\Field\Group\__construct(), ILIAS\UI\Implementation\Component\Input\ViewControl\Group\__construct(), and ILIAS\UI\Implementation\Component\Input\Field\Section\setInputs().

+ Here is the caller graph for this function:

◆ withInput()

ILIAS\UI\Implementation\Component\Input\withInput ( InputData  $input)

Collects the input, applies trafos and forwards the input to its children and returns a new input group reflecting the inputs with data that was put in.

Definition at line 77 of file Group.php.

77 : self
78 {
79 if (empty($this->getInputs())) {
80 return $this;
81 }
82
83 $clone = clone $this;
84
85 $inputs = [];
86 $contents = [];
87 $error = false;
88
89 foreach ($this->getInputs() as $key => $in) {
90 $inputs[$key] = $in->withInput($input);
91 $content = $inputs[$key]->getContent();
92 if ($content->isError()) {
93 $error = true;
94 } else {
95 $contents[$key] = $content->value();
96 }
97 }
98
99 $clone->inputs = $inputs;
100 if ($error) {
101 $clone->content = $clone->getDataFactory()->error($this->getLanguage()->txt("ui_error_in_group"));
102 } else {
103 $clone->content = $clone->applyOperationsTo($contents);
104 }
105
106 if ($clone->content->isError()) {
107 $clone->setError("" . $clone->content->error());
108 }
109
110 return $clone;
111 }

References ILIAS\$error, ILIAS\UI\Implementation\Component\Input\$inputs, ILIAS\UI\Implementation\Component\Input\getInputs(), and ILIAS\UI\Implementation\Component\Input\getLanguage().

Referenced by ILIAS\UI\Implementation\Component\Input\Field\FormInput\withInput(), and ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup\withInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ withValue()

ILIAS\UI\Implementation\Component\Input\withValue (   $value)

Get an input like this with another value displayed on the client side.

Parameters
mixed$value
Exceptions

InvalidArgumentException if value does not fit client side input

Definition at line 61 of file Group.php.

61 : self
62 {
63 $this->checkArg("value", $this->isClientSideValueOk($value), "Display value does not match input type.");
64 $clone = clone $this;
65 foreach ($this->getInputs() as $k => $i) {
66 $clone->inputs[$k] = $i->withValue($value[$k]);
67 }
68 return $clone;
69 }

References ILIAS\UI\Implementation\Component\Input\getInputs(), and ILIAS\UI\Implementation\Component\Input\ViewControl\isClientSideValueOk().

Referenced by ilObjLearningSequenceSettingsGUI\buildFormElements(), ilAddAnswerFormBuilder\buildInputs(), ILIAS\User\Settings\Administration\SettingsGUI\buildLoginNameSettings(), ilObjDataProtectionGUI\form(), ILIAS\Calendar\Recurrence\Input\BuilderImpl\getDayOfMonthInput(), ILIAS\Calendar\ConsultationHours\BookingCancellationGUI\getInputs(), ilWOPISettingsForm\getSection(), ilPCAMDFormGUI\getTemplateForm(), ilObjLinkResourceGUI\initFormSettings(), ilObjDashboardSettingsGUI\manuallySortingSettings(), ilObjForumAdministrationGUI\settingsForm(), ILIAS\UI\Implementation\Component\Input\Field\Checkbox\withValue(), ILIAS\UI\Implementation\Component\Input\Field\DateTime\withValue(), ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup\withValue(), and ILIAS\UI\Implementation\Component\Input\Field\Rating\withValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ $inputs

array ILIAS::UI::Implementation::Component::Input\$inputs = []
protected

Definition at line 42 of file Group.php.

Referenced by ILIAS\UI\Implementation\Component\Input\Container\Form\Form\__construct(), ILIAS\UI\Implementation\Component\Input\Field\Section\__construct(), ILIAS\UI\Implementation\Component\Input\Field\SwitchableGroup\__construct(), ILIAS\UI\Implementation\Component\Input\Field\Duration\__construct(), ILIAS\UI\Implementation\Component\Input\Field\Link\__construct(), ILIAS\UI\Implementation\Component\Input\Field\Group\__construct(), ILIAS\UI\Implementation\Component\Input\ViewControl\Group\__construct(), ilSearchFilterGUI\__construct(), ILIAS\Mail\Folder\MailFilterUI\__construct(), ILIAS\UI\Implementation\Component\Input\Container\Filter\Filter\__construct(), ILIAS\UI\Implementation\Component\Input\Container\Form\Standard\__construct(), ILIAS\UI\Implementation\Component\Modal\RoundTrip\__construct(), ILIAS\UI\Implementation\Component\Dropzone\File\File\__construct(), ILIAS\UI\examples\Input\Field\Markdown\base(), ilObjectGUI\buildDeleletionModal(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\buildForm(), ilUserActionAdminGUI\buildForm(), ILIAS\User\Settings\NewAccountMail\SettingsGUI\buildForm(), ilObjTestFolderGUI\buildGlobalSettingsForm(), ilObjTestGUI\buildInputPoolSelection(), ilAddAnswerFormBuilder\buildInputs(), ilObjTestFolderGUI\buildLogSettingsForm(), ilObjTestGUI\buildQuestionCreationForm(), ilObjQuestionPoolGUI\buildQuestionCreationForm(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getAdditionalFunctionalitySettingsSections(), ILIAS\MetaData\Editor\Digest\ContentAssembler\getAuthorsSection(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getAvailabilitySettingsSection(), ILIAS\User\Settings\StartingPoint\SettingsGUI\getEditFormSpecificInputs(), ilSurveyEvaluationGUI\getExportModal(), ILIAS\Survey\Mode\AbstractUIModifier\getExportModal(), ilFileVersionsGUI\getFileZipOptionsForm(), ILIAS\AccessControl\Log\Table\getFilter(), ILIAS\Repository\Form\FormAdapterGUI\getForm(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getGeneralSettingsSection(), ILIAS\Calendar\ConsultationHours\BookingCancellationGUI\getInputs(), ILIAS\UI\Implementation\Component\Input\getInputs(), ILIAS\UI\Implementation\Component\Input\Field\SwitchableGroup\getInputsWithOperationForKey(), ILIAS\GlobalScreen\GUI\I18n\MultiLanguage\TranslationWorkflowForm\getLanguageSelectionForm(), ILIAS\GlobalScreen\GUI\I18n\MultiLanguage\TranslationWorkflowForm\getLanguageSelectionInputs(), ilDashboardBlockGUI\getManageFields(), ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getPresentationSettingsSection(), ilObjRoleGUI\getRoleForm(), ilObjRoleTemplateGUI\getRoleTemplateForm(), ILIAS\GlobalScreen\GUI\I18n\MultiLanguage\TranslationWorkflowForm\getTranslationForm(), ILIAS\GlobalScreen\GUI\I18n\MultiLanguage\TranslationWorkflowForm\getTranslationInputs(), ilMMSubitemFormGUI\getTypeGroups(), ilMMTopItemFormGUI\getTypeGroups(), ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\getValues(), ilUIFilterService\handleRendering(), ilDidacticTemplateSettingsTableFilter\init(), ilObjWikiGUI\initCreateForm(), ilCronManagerGUI\initEditForm(), ilPresentationTableGUI\initFilter(), ilObjDataCollectionGUI\initForm(), ilFileVersionFormGUI\initForm(), ilDclTableViewEditGUI\initForm(), ilDclTableEditGUI\initForm(), ilObjLinkResourceGUI\initFormSettings(), ILIAS\File\Icon\IconFormUI\initIconForm(), ilObjFileGUI\initPropertiesForm(), ilObjFileGUI\initUploadForm(), ILIAS\UI\Implementation\Component\Input\Field\FilterContextRenderer\renderDurationField(), ILIAS\UI\Implementation\Component\Input\Field\Renderer\renderDurationField(), ILIAS\UI\Implementation\Component\Input\Field\FilterContextRenderer\renderFieldGroups(), ILIAS\UI\Implementation\Component\Input\Container\ViewControl\Renderer\renderStandard(), ILIAS\UI\Implementation\Component\Modal\Factory\roundtrip(), ILIAS\UI\Implementation\Component\Input\Field\Section\setInputs(), ILIAS\UI\Implementation\Component\Input\setInputs(), ilObjForumAdministrationGUI\settingsForm(), ilDclTableEditGUI\setValues(), ilDclTableViewEditGUI\setValues(), ilUserActionAdminGUI\show(), ILIAS\UI\Implementation\Component\Input\Container\Form\Factory\standard(), SectionInputTest\testCommonRendering(), DataViewControlsTest\testDataTableHasNoOrderingViewControl(), DataViewControlsTest\testDataTableHasNoOrderingViewControlDueToRecordCount(), StandardFilterTest\testDedicatedNames(), FilterTest\testGetInputs(), GroupInputTest\testGroupRendering(), GroupInputTest\testGroupWithoutRequiredField(), GroupInputTest\testGroupWithRequiredField(), ilModulesOrgUnitTypeTest\testOrgUnitTypeGuiAMDForm(), ilStudyProgrammeSubSettingsTest\testPRGSettingsAssessmentToForm(), ilStudyProgrammeSubSettingsTest\testPRGSettingsDeadlineToForm(), ilStudyProgrammeSubSettingsTest\testPRGSettingsMailToForm(), ilStudyProgrammeSubSettingsTest\testPRGSettingsTypeToForm(), ilStudyProgrammeSubSettingsTest\testPRGSettingsValidityToForm(), StandardFilterTest\testRenderActivatedCollapsed(), StandardFilterTest\testRenderActivatedExpanded(), StandardFilterTest\testRenderDeactivatedCollapsed(), StandardFilterTest\testRenderDeactivatedExpanded(), SectionInputTest\testSectionRendering(), ilStudyProgrammeAssessmentSettingsTest\testToFormInput(), ilStudyProgrammeDeadlineSettingsTest\testToFormInput(), FilterTest\testWithActivated(), FilterTest\testWithCollapsed(), FilterTest\testWithDeactivated(), FilterTest\testWithExpanded(), ILIAS\Test\Settings\MainSettings\SettingsAdditional\toForm(), ILIAS\BackgroundTasks\Implementation\Bucket\BasicBucket\userInteraction(), ILIAS\UI\examples\Input\Field\Markdown\with_limits(), ILIAS\UI\Implementation\Component\Input\withInput(), and ilUIFilterService\writeFilterStatusToSession().

◆ Group

trait ILIAS::UI::Implementation::Component::Input\Group