43 $this->
lng->txt(
'language'),
44 $this->type->getTypeIdent() .
'_lng'
46 $languageSelection->setRequired(
true);
49 foreach ($this->
lng->getInstalledLanguages() as
$lng) {
50 $options[
$lng] = $this->
lng->txt(
'meta_l_' . $lng);
55 $languageSelection->setOptions([
'' => $this->
lng->txt(
'please_choose')] + $options);
56 $languageSelection->setValue((
string) ($config[
'lng'] ??
''));
58 $option->addSubItem($languageSelection);
66 $this->
lng->txt(
'language'),
67 $this->type->getTypeIdent() .
'_lng'
69 $languageSelection->setRequired(
true);
72 foreach ($this->
lng->getInstalledLanguages() as
$lng) {
73 $options[
$lng] = $this->
lng->txt(
'meta_l_' . $lng);
78 $languageSelection->setOptions([
'' => $this->
lng->txt(
'please_choose')] + $options);
79 $languageSelection->setValue((
string) ($config[
'lng'] ??
''));
81 return $languageSelection;
87 'lng' => (
string) $form->
getInput($this->type->getTypeIdent() .
'_lng')
95 return $this->
lng->txt(
'acc_crit_type_usr_language');
100 $lng = $config[
'lng'] ??
'';
102 if (!is_string(
$lng) || 2 !== strlen(
$lng)) {
103 return $uiFactory->
legacy()->content(
'');
106 return $uiFactory->
legacy()->content($this->
lng->txt(
'meta_l_' . $lng));
Builds a Color from either hex- or rgb values.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilAccessibilityUserHasLanguageCriterionGUI.
ilAccessibilityUserHasLanguageCriterion $type
getConfigByForm(ilPropertyFormGUI $form)
appendOption(ilRadioGroupInputGUI $group, ilAccessibilityCriterionConfig $config)
getSelection(ilAccessibilityCriterionConfig $config)
__construct(ilAccessibilityUserHasLanguageCriterion $type, ilLanguage $lng)
getValuePresentation(ilAccessibilityCriterionConfig $config, Factory $uiFactory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents an option in a radio group.
A component is the most general form of an entity in the UI.
This is how the factory for UI elements looks.
Interface ilAccessibilityCriterionTypeGUI.