ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilContainerFilterAdvMDAdapter Class Reference

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

+ Collaboration diagram for ilContainerFilterAdvMDAdapter:

Public Member Functions

 __construct ()
 
 getAvailableRecordSets ()
 Get active record sets. More...
 
 getTitle (int $record_id, int $filter_id)
 Get name for filter. More...
 
 getAdvType (int $filter_id)
 
 getOptions (int $filter_id)
 

Protected Attributes

array $types = ["crs", "cat", "grp", "sess"]
 
array $supported_types
 
ilLanguage $lng
 

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 Adapter for advanced metadata service

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilContainerFilterAdvMDAdapter.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerFilterAdvMDAdapter::__construct ( )

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

36 {
37 global $DIC;
38 $this->lng = $DIC->language();
39 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAdvType()

ilContainerFilterAdvMDAdapter::getAdvType ( int  $filter_id)
Exceptions
ilException

Definition at line 91 of file class.ilContainerFilterAdvMDAdapter.php.

91 : string
92 {
94 return (string) $field->getType();
95 }
static getInstance(?int $a_field_id, ?int $a_type=null, string $language='')

References ilAdvancedMDFieldDefinition\getInstance().

+ Here is the call graph for this function:

◆ getAvailableRecordSets()

ilContainerFilterAdvMDAdapter::getAvailableRecordSets ( )

Get active record sets.

Returns
ilAdvancedMDRecord[]

Definition at line 46 of file class.ilContainerFilterAdvMDAdapter.php.

46 : array
47 {
48 $records = [];
49 foreach ($this->types as $type) {
50 foreach (ilAdvancedMDRecord::_getActivatedRecordsByObjectType($type) as $record_obj) {
51 if ($record_obj->isActive() && $record_obj->getParentObject() === 0) {
52 $records[] = $record_obj;
53 }
54 }
55 }
56 return $records;
57 }
static _getActivatedRecordsByObjectType(string $a_obj_type, string $a_sub_type="", bool $a_only_optional=false)
Get activated records by object type.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType().

+ Here is the call graph for this function:

◆ getOptions()

ilContainerFilterAdvMDAdapter::getOptions ( int  $filter_id)

Definition at line 97 of file class.ilContainerFilterAdvMDAdapter.php.

97 : array
98 {
100 return $field->getOptionsInDefaultLanguageAsArray();
101 }

References ilAdvancedMDFieldDefinition\getInstance().

+ Here is the call graph for this function:

◆ getTitle()

ilContainerFilterAdvMDAdapter::getTitle ( int  $record_id,
int  $filter_id 
)

Get name for filter.

Exceptions
ilException

Definition at line 76 of file class.ilContainerFilterAdvMDAdapter.php.

76 : string
77 {
79
80 if ($record_id === 0) {
81 return $lng->txt("cont_std_filter_title_" . $filter_id);
82 }
83
85 return $field->getTitle();
86 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $lng, ilAdvancedMDFieldDefinition\getInstance(), and ilLanguage\txt().

+ Here is the call graph for this function:

Field Documentation

◆ $lng

ilLanguage ilContainerFilterAdvMDAdapter::$lng
protected

Definition at line 33 of file class.ilContainerFilterAdvMDAdapter.php.

Referenced by getTitle().

◆ $supported_types

◆ $types

array ilContainerFilterAdvMDAdapter::$types = ["crs", "cat", "grp", "sess"]
protected

Definition at line 26 of file class.ilContainerFilterAdvMDAdapter.php.


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