3 declare(strict_types=1);
50 foreach (self::_getSearchableFieldsInfo($a_admin) as $field) {
51 if (is_numeric($field[
'db'])) {
52 $field[
'db'] =
'udf_' . $field[
'db'];
55 $col_info[$field[
'db']] = array(
56 'txt' => $field[
'lang']
59 if ($field[
'db'] ==
'login' or $field[
'db'] ==
'firstname' or $field[
'db'] ==
'lastname') {
60 $col_info[$field[
'db']][
'default'] =
true;
70 $lng = $DIC->language();
73 $lng->loadLanguageModule(
'user');
84 $fields[$counter][
'values'] = array();
85 $fields[$counter][
'type'] = self::FIELD_TYPE_TEXT;
86 $fields[$counter][
'lang'] =
$lng->txt($field);
87 $fields[$counter][
'db'] = $field;
92 $fields[$counter][
'autoComplete'] =
false;
99 $fields[$counter][
'autoComplete'] =
true;
103 $fields[$counter][
'lang'] =
$lng->txt(
'person_title');
109 $fields[$counter][
'type'] = self::FIELD_TYPE_SELECT;
110 $fields[$counter][
'values'] = array(
111 0 =>
$lng->txt(
'please_choose'),
112 'n' =>
$lng->txt(
'gender_n'),
113 'f' =>
$lng->txt(
'gender_f'),
114 'm' =>
$lng->txt(
'gender_m'),
119 $fields[$counter][
'type'] = self::FIELD_TYPE_SELECT;
120 $fields[$counter][
'values'] = array(0 =>
$lng->txt(
'please_choose'));
123 $lng->loadLanguageModule(
'meta');
125 $fields[$counter][
'values'][
$c] =
$lng->txt(
'meta_c_' . $c);
127 asort($fields[$counter][
'values']);
131 $fields[$counter][
'type'] = self::FIELD_TYPE_SELECT;
133 $options[0] =
$lng->txt(
'select_one');
134 foreach ($paths as $org_ref_id =>
$path) {
135 $options[$org_ref_id] =
$path;
138 $fields[$counter][
'values'] = $options;
143 case 'interests_general':
144 case 'interests_help_offered':
145 case 'interests_help_looking':
146 $fields[$counter][
'type'] = self::FIELD_TYPE_MULTI;
154 return $fields ?: array();
159 return array(
'gender',
178 'interests_help_offered',
179 'interests_help_looking' 196 if ($a_key ==
'login') {
199 return (
bool)
$settings->get(
'search_enabled_' . $a_key);
202 public static function _saveStatus(
string $a_key,
bool $a_enabled): bool
206 $ilias = $DIC[
'ilias'];
208 $ilias->setSetting(
'search_enabled_' . $a_key, (
string) $a_enabled);
215 foreach ($user_defined_fields->getSearchableDefinitions() as $definition) {
217 $fields[$counter][
'lang'] = $definition[
'field_name'];
218 $fields[$counter][
'db'] = $definition[
'field_id'];
220 switch ($definition[
'field_type']) {
222 $fields[$counter][
'type'] = self::FIELD_TYPE_UDF_TEXT;
226 $fields[$counter][
'type'] = self::FIELD_TYPE_UDF_SELECT;
230 $fields[$counter][
'type'] = self::FIELD_TYPE_UDF_WYSIWYG;
235 $fields[$counter][
'type'] = $definition[
'field_type'];
247 $lng = $DIC->language();
249 $new_values = array(0 =>
$lng->txt(
'please_choose'));
250 foreach ($a_values as $value) {
251 $new_values[$value] = $value;
static _saveStatus(string $a_key, bool $a_enabled)
static _isSearchable(string $a_key)
const FIELD_TYPE_UDF_UNDEFINED
static getTextRepresentationOfOrgUnits(bool $sort_by_title=true)
Get ref id path array.
static __appendUserDefinedFields(array $fields, int $counter)
const UDF_TYPE_TEXT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPossibleFields(bool $a_admin=false)
static _getSearchableFieldsInfo(bool $a_admin=false)
const FIELD_TYPE_UDF_WYSIWYG
static __prepareValues(array $a_values)
static getSelectableColumnInfo(bool $a_admin=false)
Get info of searchable fields for selectable columns in table gui.
const FIELD_TYPE_UDF_SELECT
static getCountryCodes()
Get country codes (DIN EN 3166-1)
static _isEnabled($a_key)
const FIELD_TYPE_UDF_TEXT