ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\MetaData\OERHarvester\Settings\Settings Class Reference
+ Inheritance diagram for ILIAS\MetaData\OERHarvester\Settings\Settings:
+ Collaboration diagram for ILIAS\MetaData\OERHarvester\Settings\Settings:

Public Member Functions

 __construct ()
 
 getObjectTypesEligibleForHarvesting ()
 
 getObjectTypesSelectedForHarvesting ()
 
 isObjectTypeSelectedForHarvesting (string $type)
 
 saveObjectTypesSelectedForHarvesting (string ... $types)
 
 getCopyrightEntryIDsSelectedForHarvesting ()
 
 isCopyrightEntryIDSelectedForHarvesting (int $id)
 
 saveCopyrightEntryIDsSelectedForHarvesting (int ... $ids)
 
 getContainerRefIDForHarvesting ()
 
 saveContainerRefIDForHarvesting (int $ref_id)
 
 getContainerRefIDForExposing ()
 
 saveContainerRefIDForExposing (int $ref_id)
 
 getObjectTypesEligibleForHarvesting ()
 
 getObjectTypesSelectedForHarvesting ()
 
 isObjectTypeSelectedForHarvesting (string $type)
 
 saveObjectTypesSelectedForHarvesting (string ... $types)
 
 getCopyrightEntryIDsSelectedForHarvesting ()
 
 isCopyrightEntryIDSelectedForHarvesting (int $id)
 
 saveCopyrightEntryIDsSelectedForHarvesting (int ... $ids)
 
 getContainerRefIDForHarvesting ()
 
 saveContainerRefIDForHarvesting (int $ref_id)
 
 getContainerRefIDForExposing ()
 
 saveContainerRefIDForExposing (int $ref_id)
 

Protected Attributes

const string STORAGE_IDENTIFIER = 'meta_oer'
 
const array ELIGIBLE_TYPES
 
ilSetting $settings
 
array $selected_obj_types
 
array $selected_cp_entry_ids
 
int $target_for_harvesting_ref_id
 
int $source_for_exposing_ref_id
 

Detailed Description

Definition at line 23 of file Settings.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MetaData\OERHarvester\Settings\Settings::__construct ( )

Definition at line 58 of file Settings.php.

59 {
60 $this->settings = new \ilSetting(self::STORAGE_IDENTIFIER);
61 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ getContainerRefIDForExposing()

ILIAS\MetaData\OERHarvester\Settings\Settings::getContainerRefIDForExposing ( )

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 152 of file Settings.php.

152 : int
153 {
154 if (isset($this->source_for_exposing_ref_id)) {
156 }
157 return $this->source_for_exposing_ref_id = (int) $this->settings->get(
158 'exposed_container',
159 '0'
160 );
161 }

References ILIAS\MetaData\OERHarvester\Settings\Settings\$source_for_exposing_ref_id, ILIAS\Repository\int(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ getContainerRefIDForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::getContainerRefIDForHarvesting ( )

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 135 of file Settings.php.

135 : int
136 {
137 if (isset($this->target_for_harvesting_ref_id)) {
139 }
140 return $this->target_for_harvesting_ref_id = (int) $this->settings->get(
141 'target',
142 '0'
143 );
144 }

References ILIAS\MetaData\OERHarvester\Settings\Settings\$target_for_harvesting_ref_id, ILIAS\Repository\int(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ getCopyrightEntryIDsSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::getCopyrightEntryIDsSelectedForHarvesting ( )
Returns
int[]

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 107 of file Settings.php.

107 : array
108 {
109 if (isset($this->selected_cp_entry_ids)) {
111 }
112 $ids_from_storage = unserialize(
113 $this->settings->get('templates', serialize([])),
114 ['allowed_classes' => false]
115 );
116 $this->selected_cp_entry_ids = [];
117 foreach ($ids_from_storage as $id) {
118 $this->selected_cp_entry_ids[] = (int) $id;
119 }
121 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id, ILIAS\MetaData\OERHarvester\Settings\Settings\$selected_cp_entry_ids, ILIAS\Repository\int(), and ILIAS\Repository\settings().

Referenced by ILIAS\MetaData\OERHarvester\Settings\Settings\isCopyrightEntryIDSelectedForHarvesting().

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

◆ getObjectTypesEligibleForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::getObjectTypesEligibleForHarvesting ( )
Returns
string[]

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 66 of file Settings.php.

66 : array
67 {
69 }

References ILIAS\MetaData\OERHarvester\Settings\Settings\ELIGIBLE_TYPES.

Referenced by ILIAS\MetaData\OERHarvester\Settings\Settings\getObjectTypesSelectedForHarvesting().

+ Here is the caller graph for this function:

◆ getObjectTypesSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::getObjectTypesSelectedForHarvesting ( )
Returns
string[]

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 74 of file Settings.php.

74 : array
75 {
76 if (isset($this->selected_obj_types)) {
78 }
79 $types_from_storage = unserialize(
80 $this->settings->get(
81 'collected_types',
82 serialize($this->getObjectTypesEligibleForHarvesting()),
83 ),
84 ['allowed_classes' => false]
85 );
86 return $this->selected_obj_types = array_intersect(
87 $types_from_storage,
89 );
90 }

References ILIAS\MetaData\OERHarvester\Settings\Settings\$selected_obj_types, ILIAS\MetaData\OERHarvester\Settings\Settings\getObjectTypesEligibleForHarvesting(), and ILIAS\Repository\settings().

Referenced by ILIAS\MetaData\OERHarvester\Settings\Settings\isObjectTypeSelectedForHarvesting().

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

◆ isCopyrightEntryIDSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::isCopyrightEntryIDSelectedForHarvesting ( int  $id)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 123 of file Settings.php.

123 : bool
124 {
125 $entry_ids = $this->getCopyrightEntryIDsSelectedForHarvesting();
126 return in_array($id, $entry_ids);
127 }

References $id, and ILIAS\MetaData\OERHarvester\Settings\Settings\getCopyrightEntryIDsSelectedForHarvesting().

+ Here is the call graph for this function:

◆ isObjectTypeSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::isObjectTypeSelectedForHarvesting ( string  $type)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 92 of file Settings.php.

92 : bool
93 {
95 return in_array($type, $types);
96 }

References ILIAS\MetaData\OERHarvester\Settings\Settings\getObjectTypesSelectedForHarvesting().

+ Here is the call graph for this function:

◆ saveContainerRefIDForExposing()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveContainerRefIDForExposing ( int  $ref_id)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 163 of file Settings.php.

163 : void
164 {
165 $this->source_for_exposing_ref_id = $ref_id;
166 $this->settings->set('exposed_container', (string) $ref_id);
167 }
$ref_id
Definition: ltiauth.php:66

References $ref_id, and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveContainerRefIDForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveContainerRefIDForHarvesting ( int  $ref_id)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 146 of file Settings.php.

146 : void
147 {
148 $this->target_for_harvesting_ref_id = $ref_id;
149 $this->settings->set('target', (string) $ref_id);
150 }

References $ref_id, and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveCopyrightEntryIDsSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveCopyrightEntryIDsSelectedForHarvesting ( int ...  $ids)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 129 of file Settings.php.

129 : void
130 {
131 $this->selected_cp_entry_ids = $ids;
132 $this->settings->set('templates', serialize($ids));
133 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveObjectTypesSelectedForHarvesting()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveObjectTypesSelectedForHarvesting ( string ...  $types)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 98 of file Settings.php.

98 : void
99 {
100 $this->selected_obj_types = $types;
101 $this->settings->set('collected_types', serialize($types));
102 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

Field Documentation

◆ $selected_cp_entry_ids

array ILIAS\MetaData\OERHarvester\Settings\Settings::$selected_cp_entry_ids
protected

◆ $selected_obj_types

array ILIAS\MetaData\OERHarvester\Settings\Settings::$selected_obj_types
protected

◆ $settings

ilSetting ILIAS\MetaData\OERHarvester\Settings\Settings::$settings
protected

Definition at line 44 of file Settings.php.

◆ $source_for_exposing_ref_id

int ILIAS\MetaData\OERHarvester\Settings\Settings::$source_for_exposing_ref_id
protected

◆ $target_for_harvesting_ref_id

int ILIAS\MetaData\OERHarvester\Settings\Settings::$target_for_harvesting_ref_id
protected

◆ ELIGIBLE_TYPES

const array ILIAS\MetaData\OERHarvester\Settings\Settings::ELIGIBLE_TYPES
protected
Initial value:
= [
'blog',
'copa',
'dcl',
'exc',
'file',
'glo',
'lm',
'htlm',
'sahs',
'mcst',
'mep',
'qpl',
'spl',
'webr',
'wiki'
]

Definition at line 26 of file Settings.php.

Referenced by ILIAS\MetaData\OERHarvester\Settings\Settings\getObjectTypesEligibleForHarvesting().

◆ STORAGE_IDENTIFIER

const string ILIAS\MetaData\OERHarvester\Settings\Settings::STORAGE_IDENTIFIER = 'meta_oer'
protected

Definition at line 25 of file Settings.php.


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