ILIAS  release_8 Revision v8.24
ilMDUtilSelect Class Reference
+ Collaboration diagram for ilMDUtilSelect:

Static Public Member Functions

static _getLanguageSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta data language selector. More...
 
static _getStructureSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta general structure selector. More...
 
static _getStatusSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta lifecycle status selector. More...
 
static _getRoleSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta lifecycle status selector. More...
 
static _getOperatingSystemSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical os selector. More...
 
static _getBrowserSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical browser selector. More...
 
static _getFormatSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta technical format selector All possible entries in meta_format are shown. More...
 
static _getDurationSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta technical duration selector All possible entries in meta_format are shown. More...
 
static _getInteractivityTypeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational interactivity type All possible entries in meta_format are shown. More...
 
static _getLearningResourceTypeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational learning resource type All possible entries in meta_format are shown. More...
 
static _getInteractivityLevelSelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational interactivity level All possible entries in meta_format are shown. More...
 
static _getSemanticDensitySelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational semantic density All possible entries in meta_format are shown. More...
 
static _getIntendedEndUserRoleSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational intended end user role All possible entries in meta_format are shown. More...
 
static _getContextSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta context. More...
 
static _getLocationTypeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta location type. More...
 
static _getDifficultySelect ( $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta educational difficulty All possible entries in meta_format are shown. More...
 
static _getTypicalAgeRangeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta educational typical age range All possible entries in meta_format are shown. More...
 
static _getTypicalLearningTimeSelect (string $a_selected, string $a_name, array $prepend=array())
 Prepare a meta educational typical learning time All possible entries in meta_format are shown. More...
 
static _getCostsSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights costs All possible entries in meta_format are shown. More...
 
static _getCopyrightAndOtherRestrictionsSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown. More...
 
static _getPurposeSelect (string $a_selected, string $a_name, array $prepend=array(), bool $a_options_only=false)
 Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown. More...
 

Detailed Description

Definition at line 27 of file class.ilMDUtilSelect.php.

Member Function Documentation

◆ _getBrowserSelect()

static ilMDUtilSelect::_getBrowserSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical browser selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 234 of file class.ilMDUtilSelect.php.

239 { // END PATCH Lucene Search
240 global $DIC;
241
242 $lng = $DIC['lng'];
243
244 $items = array('Any', 'NetscapeCommunicator', 'MS-InternetExplorer', 'Opera', 'Amaya', 'Mozilla');
245
246 foreach ($prepend as $value => $translation) {
247 $options[$value] = $translation;
248 }
249
250 foreach ($items as $item) {
251 $options[$item] = $item;
252 }
253 // BEGIN PATCH Lucene search
254 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
255 $a_selected,
256 $a_name,
257 $options,
258 false,
259 true
260 );
261 // END PATCH Lucene Search
262 }
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
global $DIC
Definition: feed.php:28
$lng

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), and ilMDEditorGUI\listTechnical().

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

◆ _getContextSelect()

static ilMDUtilSelect::_getContextSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta context.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 555 of file class.ilMDUtilSelect.php.

560 { // END PATCH Lucene Search
561 global $DIC;
562
563 $lng = $DIC['lng'];
564
565 $items = array('School', 'HigherEducation', 'Training', 'Other');
566
567 foreach ($prepend as $value => $translation) {
568 $options[$value] = $translation;
569 }
570
571 foreach ($items as $item) {
572 $options[$item] = $item;
573 }
574 // BEGIN PATCH Lucene search
575 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
576 $a_selected,
577 $a_name,
578 $options,
579 false,
580 true
581 );
582 // END PATCH Lucene Search
583 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getCopyrightAndOtherRestrictionsSelect()

static ilMDUtilSelect::_getCopyrightAndOtherRestrictionsSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 752 of file class.ilMDUtilSelect.php.

757 { // END PATCH Lucene Search
758 global $DIC;
759
760 $lng = $DIC['lng'];
761
762 $items = array('Yes', 'No');
763
764 foreach ($prepend as $value => $translation) {
765 $options[$value] = $translation;
766 }
767
768 foreach ($items as $item) {
769 $options[$item] = $item;
770 }
771 // BEGIN PATCH Lucene search
772 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
773 $a_selected,
774 $a_name,
775 $options,
776 false,
777 true
778 );
779 // END PATCH Lucene Search
780 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getCostsSelect()

static ilMDUtilSelect::_getCostsSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights costs All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 715 of file class.ilMDUtilSelect.php.

720 { // END PATCH Lucene Search
721 global $DIC;
722
723 $lng = $DIC['lng'];
724
725 $items = array('Yes', 'No');
726
727 foreach ($prepend as $value => $translation) {
728 $options[$value] = $translation;
729 }
730
731 foreach ($items as $item) {
732 $options[$item] = $item;
733 }
734 // BEGIN PATCH Lucene search
735 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
736 $a_selected,
737 $a_name,
738 $options,
739 false,
740 true
741 );
742 // END PATCH Lucene Search
743 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getDifficultySelect()

static ilMDUtilSelect::_getDifficultySelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational difficulty All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 616 of file class.ilMDUtilSelect.php.

621 { // END PATCH Lucene Search
622 global $DIC;
623
624 $lng = $DIC['lng'];
625
626 $items = array(1 => 'VeryEasy', 2 => 'Easy', 3 => 'Medium', 4 => 'Difficult', 5 => 'VeryDifficult');
627
628 foreach ($prepend as $value => $translation) {
629 $options[$value] = $translation;
630 }
631
632 foreach ($items as $key => $item) {
633 $options[$key] = $item;
634 }
635 // BEGIN PATCH Lucene search
636 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
637 $a_selected,
638 $a_name,
639 $options,
640 false,
641 true
642 );
643 // END PATCH Lucene Search
644 }
string $key
Consumer key/client ID value.
Definition: System.php:193

References $DIC, ILIAS\LTI\ToolProvider\$key, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), and ilLuceneAdvancedSearchFields\parseFieldQuery().

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

◆ _getDurationSelect()

static ilMDUtilSelect::_getDurationSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta technical duration selector All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 317 of file class.ilMDUtilSelect.php.

317 : string
318 {
319 global $DIC;
320
321 $lng = $DIC['lng'];
322
323 foreach ($prepend as $value => $translation) {
324 $options[$value] = $translation;
325 }
326
327 $items = array(
328 15 => '15 ' . $lng->txt('minutes'),
329 30 => '30 ' . $lng->txt('minutes'),
330 45 => '45 ' . $lng->txt('minutes'),
331 60 => '1 ' . $lng->txt('hour'),
332 90 => '1 ' . $lng->txt('hour') . ' 30 ' . $lng->txt('minutes'),
333 120 => '2 ' . $lng->txt('hours'),
334 180 => '3 ' . $lng->txt('hours'),
335 240 => '4 ' . $lng->txt('hours')
336 );
337
338 foreach ($items as $key => $item) {
339 $options[$key] = $item;
340 }
341 return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
342 }

References $DIC, ILIAS\LTI\ToolProvider\$key, $lng, and ilLegacyFormElementsUtil\formSelect().

+ Here is the call graph for this function:

◆ _getFormatSelect()

static ilMDUtilSelect::_getFormatSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical format selector All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 270 of file class.ilMDUtilSelect.php.

275 { // END PATCH Lucene Search
276 global $DIC;
277
278 $lng = $DIC['lng'];
279 $ilDB = $DIC['ilDB'];
280
281 $options = [];
282 foreach ($prepend as $value => $translation) {
283 $options[$value] = $translation;
284 }
285
286 $ilDB->setLimit(200, 0);
287 // In case an index is defined on field il_meta_format, this group by
288 // statement takes advantage of it to improve the performance of the query.
289 $query = "SELECT format AS forma from il_meta_format GROUP BY format";
290 $res = $ilDB->query($query);
291 if (!$res->numRows()) {
292 return '';
293 }
294
295 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
296 if (is_string($row->forma) && $row->forma !== '') {
297 $options[$row->forma] = substr($row->forma, 0, 48);
298 }
299 }
300
301 // BEGIN PATCH Lucene search
302 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
303 $a_selected,
304 $a_name,
305 $options,
306 false,
307 true
308 );
309 // END PATCH Lucene Search
310 }
$res
Definition: ltiservices.php:69
$query

References $DIC, $ilDB, $lng, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getIntendedEndUserRoleSelect()

static ilMDUtilSelect::_getIntendedEndUserRoleSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational intended end user role All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 519 of file class.ilMDUtilSelect.php.

524 { // END PATCH Lucene Search
525 global $DIC;
526
527 $lng = $DIC['lng'];
528
529 $items = array('Teacher', 'Author', 'Learner', 'Manager');
530
531 foreach ($prepend as $value => $translation) {
532 $options[$value] = $translation;
533 }
534
535 foreach ($items as $item) {
536 $options[$item] = $item;
537 }
538 // BEGIN PATCH Lucene search
539 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
540 $a_selected,
541 $a_name,
542 $options,
543 false,
544 true
545 );
546 // END PATCH Lucene Search
547 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getInteractivityLevelSelect()

static ilMDUtilSelect::_getInteractivityLevelSelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational interactivity level All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 443 of file class.ilMDUtilSelect.php.

448 {
449 global $DIC;
450
451 $lng = $DIC['lng'];
452
453 $items = array(1 => 'VeryLow', 2 => 'Low', 3 => 'Medium', 4 => 'High', 5 => 'VeryHigh');
454
455 foreach ($prepend as $value => $translation) {
456 $options[$value] = $translation;
457 }
458
459 foreach ($items as $key => $item) {
460 $options[$key] = $item;
461 }
462 // BEGIN PATCH Lucene search
463 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
464 $a_selected,
465 $a_name,
466 $options,
467 false,
468 true
469 );
470 // END PATCH Lucene Search
471 }

References $DIC, ILIAS\LTI\ToolProvider\$key, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), and ilLuceneAdvancedSearchFields\parseFieldQuery().

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

◆ _getInteractivityTypeSelect()

static ilMDUtilSelect::_getInteractivityTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational interactivity type All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 351 of file class.ilMDUtilSelect.php.

356 { // END PATCH Lucene Search
357 global $DIC;
358
359 $lng = $DIC['lng'];
360
361 $items = array('Actice', 'Expositive', 'Mixed');
362
363 foreach ($prepend as $value => $translation) {
364 $options[$value] = $translation;
365 }
366
367 foreach ($items as $item) {
368 $options[$item] = $item;
369 }
370 // BEGIN PATCH Lucene search
371 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
372 $a_selected,
373 $a_name,
374 $options,
375 false,
376 true
377 );
378 // END PATCH Lucene Search
379 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getLanguageSelect()

static ilMDUtilSelect::_getLanguageSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta data language selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 35 of file class.ilMDUtilSelect.php.

40 { // END PATCH Lucene Search
41 global $DIC;
42
43 $lng = $DIC['lng'];
44
46 $tmp_options[$code] = $lng->txt('meta_l_' . $code);
47 }
48 asort($tmp_options, SORT_STRING);
49
50 $options = [];
51 foreach ($prepend as $value => $translation) {
52 $options[$value] = $translation;
53 }
54 $options = array_merge($options, $tmp_options);
55 // BEGIN PATCH Lucene search
56 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
57 $a_selected,
58 $a_name,
59 $options,
60 false,
61 true
62 );
63 // END PATCH Lucene Search
64 }

References $DIC, $lng, ilMDLanguageItem\_getPossibleLanguageCodes(), and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getLearningResourceTypeSelect()

static ilMDUtilSelect::_getLearningResourceTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational learning resource type All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 388 of file class.ilMDUtilSelect.php.

393 { // END PATCH Lucene Search
394 global $DIC;
395
396 $lng = $DIC['lng'];
397
398 $items = array(
399 'Exercise',
400 'Simulation',
401 'Questionnaire',
402 'Diagram',
403 'Figure',
404 'Graph',
405 'Index',
406 'Slide',
407 'Table',
408 'NarrativeText',
409 'Exam',
410 'Experiment',
411 'ProblemStatement',
412 'SelfAssessment',
413 'Lecture'
414 );
415
416 foreach ($prepend as $value => $translation) {
417 $options[$value] = $translation;
418 }
419
420 foreach ($items as $item) {
421 $options[$item] = $item;
422 }
423 // BEGIN PATCH Lucene search
424 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
425 $a_selected,
426 $a_name,
427 $options,
428 false,
429 true
430 );
431 // END PATCH Lucene Search
432 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getLocationTypeSelect()

static ilMDUtilSelect::_getLocationTypeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta location type.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 589 of file class.ilMDUtilSelect.php.

589 : string
590 {
591 global $DIC;
592
593 $lng = $DIC['lng'];
594
595 $items = array('LocalFile', 'Reference');
596
597 foreach ($prepend as $value => $translation) {
598 $options[$value] = $translation;
599 }
600
601 foreach ($items as $item) {
602 $options[$item] = $item;
603 }
604 return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
605 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilMDEditorGUI\listTechnical().

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

◆ _getOperatingSystemSelect()

static ilMDUtilSelect::_getOperatingSystemSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta technical os selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 198 of file class.ilMDUtilSelect.php.

203 { // END PATCH Lucene Search
204 global $DIC;
205
206 $lng = $DIC['lng'];
207
208 $items = array('PC-DOS', 'MS-Windows', 'MAC-OS', 'Unix', 'Multi-OS', 'None');
209
210 foreach ($prepend as $value => $translation) {
211 $options[$value] = $translation;
212 }
213
214 foreach ($items as $item) {
215 $options[$item] = $item;
216 }
217 // BEGIN PATCH Lucene search
218 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
219 $a_selected,
220 $a_name,
221 $options,
222 false,
223 true
224 );
225 // END PATCH Lucene Search
226 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), and ilMDEditorGUI\listTechnical().

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

◆ _getPurposeSelect()

static ilMDUtilSelect::_getPurposeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta rights copyright and other restrictions All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 789 of file class.ilMDUtilSelect.php.

794 { // END PATCH Lucene Search
795 global $DIC;
796
797 $lng = $DIC['lng'];
798
799 $items = array(
800 'Discipline',
801 'Idea',
802 'Prerequisite',
803 'EducationalObjective',
804 'AccessibilityRestrictions',
805 'EducationalLevel',
806 'SkillLevel',
807 'SecurityLevel',
808 'Competency'
809 );
810
811 foreach ($prepend as $value => $translation) {
812 $options[$value] = $translation;
813 }
814
815 foreach ($items as $item) {
816 $options[$item] = $item;
817 }
818 // BEGIN PATCH Lucene search
819 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
820 $a_selected,
821 $a_name,
822 $options,
823 false,
824 true
825 );
826 // END PATCH Lucene Search
827 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getRoleSelect()

static ilMDUtilSelect::_getRoleSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta lifecycle status selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 144 of file class.ilMDUtilSelect.php.

149 { // END PATCH Lucene Search
150 global $DIC;
151
152 $lng = $DIC['lng'];
153
154 $items = array(
155 'Author',
156 'Publisher',
157 'Unknown',
158 'Initiator',
159 'Terminator',
160 'Editor',
161 'GraphicalDesigner',
162 'TechnicalImplementer',
163 'ContentProvider',
164 'TechnicalValidator',
165 'EducationalValidator',
166 'ScriptWriter',
167 'InstructionalDesigner',
168 'SubjectMatterExpert',
169 'Creator',
170 'Validator',
171 'PointOfContact'
172 );
173
174 foreach ($prepend as $value => $translation) {
175 $options[$value] = $translation;
176 }
177
178 foreach ($items as $item) {
179 $options[$item] = $lng->txt('meta_' . strtolower($item));
180 }
181 // BEGIN PATCH Lucene search
182 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
183 $a_selected,
184 $a_name,
185 $options,
186 false,
187 true
188 );
189 // END PATCH Lucene Search
190 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), ilMDEditorGUI\listLifecycle(), and ilMDEditorGUI\listMetaMetaData().

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

◆ _getSemanticDensitySelect()

static ilMDUtilSelect::_getSemanticDensitySelect (   $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta educational semantic density All possible entries in meta_format are shown.

Parameters
mixed$a_selected
string$a_name
array$prepend
bool$a_options_only
Returns
array|string

Definition at line 482 of file class.ilMDUtilSelect.php.

487 { // END PATCH Lucene Search
488 global $DIC;
489
490 $lng = $DIC['lng'];
491
492 $items = array(1 => 'VeryLow', 2 => 'Low', 3 => 'Medium', 4 => 'High', 5 => 'VeryHigh');
493
494 foreach ($prepend as $value => $translation) {
495 $options[$value] = $translation;
496 }
497
498 foreach ($items as $key => $item) {
499 $options[$key] = $item;
500 }
501 // BEGIN PATCH Lucene search
502 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
503 $a_selected,
504 $a_name,
505 $options,
506 false,
507 true
508 );
509 // END PATCH Lucene Search
510 }

References $DIC, ILIAS\LTI\ToolProvider\$key, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), and ilLuceneAdvancedSearchFields\parseFieldQuery().

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

◆ _getStatusSelect()

static ilMDUtilSelect::_getStatusSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta lifecycle status selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 108 of file class.ilMDUtilSelect.php.

113 { // END PATCH Lucene Search
114 global $DIC;
115
116 $lng = $DIC['lng'];
117
118 $items = array('Draft', 'Final', 'Revised', 'Unavailable');
119
120 foreach ($prepend as $value => $translation) {
121 $options[$value] = $translation;
122 }
123
124 foreach ($items as $item) {
125 $options[$item] = $lng->txt('meta_' . strtolower($item));
126 }
127 // BEGIN PATCH Lucene search
128 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
129 $a_selected,
130 $a_name,
131 $options,
132 false,
133 true
134 );
135 // END PATCH Lucene Search
136 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement(), ilMDEditorGUI\listLifecycle(), and ilMDEditorGUI\listQuickEdit_scorm().

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

◆ _getStructureSelect()

static ilMDUtilSelect::_getStructureSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array(),
bool  $a_options_only = false 
)
static

Prepare a meta general structure selector.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')
Returns
string|array Complete html select

Definition at line 72 of file class.ilMDUtilSelect.php.

77 { // END PATCH Lucene Search
78 global $DIC;
79
80 $lng = $DIC['lng'];
81
82 $items = array('Atomic', 'Collection', 'Networked', 'Hierarchical', 'Linear');
83
84 foreach ($prepend as $value => $translation) {
85 $options[$value] = $translation;
86 }
87
88 foreach ($items as $item) {
89 $options[$item] = $lng->txt('meta_' . strtolower($item));
90 }
91 // BEGIN PATCH Lucene search
92 return $a_options_only ? $options : ilLegacyFormElementsUtil::formSelect(
93 $a_selected,
94 $a_name,
95 $options,
96 false,
97 true
98 );
99 // END PATCH Lucene Search
100 }

References $DIC, $lng, and ilLegacyFormElementsUtil\formSelect().

Referenced by ilLuceneAdvancedSearchFields\getFormElement().

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

◆ _getTypicalAgeRangeSelect()

static ilMDUtilSelect::_getTypicalAgeRangeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta educational typical age range All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 651 of file class.ilMDUtilSelect.php.

655 : string {
656 global $DIC;
657
658 $lng = $DIC['lng'];
659
660 $options = [];
661 foreach ($prepend as $value => $translation) {
662 $options[$value] = $translation;
663 }
664 $items = [];
665 for ($i = 1; $i < 100; $i++) {
666 $items[$i] = $i;
667 }
668 foreach ($items as $key => $item) {
669 $options[$key] = $item;
670 }
671 return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
672 }
$i
Definition: metadata.php:41

◆ _getTypicalLearningTimeSelect()

static ilMDUtilSelect::_getTypicalLearningTimeSelect ( string  $a_selected,
string  $a_name,
array  $prepend = array() 
)
static

Prepare a meta educational typical learning time All possible entries in meta_format are shown.

Parameters
array$prependarray(value => 'string') of first item. E.g: array(0,'-Please select-')

Definition at line 679 of file class.ilMDUtilSelect.php.

683 : string {
684 global $DIC;
685
686 $lng = $DIC['lng'];
687
688 foreach ($prepend as $value => $translation) {
689 $options[$value] = $translation;
690 }
691 $items = array(
692 15 => '15 ' . $lng->txt('minutes'),
693 30 => '30 ' . $lng->txt('minutes'),
694 45 => '45 ' . $lng->txt('minutes'),
695 60 => '1 ' . $lng->txt('hour'),
696 90 => '1 ' . $lng->txt('hour') . ' 30 ' . $lng->txt('minutes'),
697 120 => '2 ' . $lng->txt('hours'),
698 180 => '3 ' . $lng->txt('hours'),
699 240 => '4 ' . $lng->txt('hours')
700 );
701
702 foreach ($items as $key => $item) {
703 $options[$key] = $item;
704 }
705 return ilLegacyFormElementsUtil::formSelect($a_selected, $a_name, $options, false, true);
706 }

The documentation for this class was generated from the following file: