38 $option->setInfo($this->lng->txt(
'tos_crit_type_usr_language_info'));
40 $languageSelection = new \ilSelectInputGUI(
41 $this->lng->txt(
'language'),
42 $this->type->getTypeIdent() .
'_lng' 44 $languageSelection->setRequired(
true);
47 foreach ($this->lng->getInstalledLanguages() as
$lng) {
53 $languageSelection->setOptions([
'' => $this->lng->txt(
'please_choose')] +
$options);
54 $languageSelection->setValue((
string) ($config[
'lng'] ??
''));
56 $option->addSubItem($languageSelection);
66 $config = new \ilTermsOfServiceCriterionConfig([
67 'lng' => (
string) $form->
getInput($this->type->getTypeIdent() .
'_lng')
78 return $this->lng->txt(
'tos_crit_type_usr_language');
86 $lng = $config[
'lng'] ??
'';
88 if (!is_string(
$lng) || 2 !== strlen(
$lng)) {
89 return $uiFactory->
legacy(
'');
92 return $uiFactory->
legacy($this->lng->txt(
'meta_l_' . (
string)
$lng));
getValuePresentation(\ilTermsOfServiceCriterionConfig $config, Factory $uiFactory)
Component
Interface ilTermsOfServiceCriterionTypeGUI.
appendOption(\ilRadioGroupInputGUI $group, \ilTermsOfServiceCriterionConfig $config)
Class ilTermsOfServiceUserHasLanguageCriterionGUI.
Class ilTermsOfServiceCriterionConfig.
__construct(\ilTermsOfServiceUserHasLanguageCriterion $type, \ilLanguage $lng)
ilTermsOfServiceUserHasLanguageCriterionGUI constructor.
if(isset($_POST['submit'])) $form
This is how the factory for UI elements looks.
legacy($content)
description: purpose: > This component is used to wrap an existing ILIAS UI element into a UI compon...
getConfigByForm(\ilPropertyFormGUI $form)
Class ilTermsOfServiceUserHasLanguageCriterion.
getIdentPresentation()
string