ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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)
 

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.

References ILIAS\Repository\settings().

59  {
60  $this->settings = new \ilSetting(self::STORAGE_IDENTIFIER);
61  }
+ 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.

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

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  }
+ 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.

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

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  }
+ 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.

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().

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
+ 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.

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

66  : array
67  {
68  return self::ELIGIBLE_TYPES;
69  }
+ 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.

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().

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  }
+ 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.

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

123  : bool
124  {
125  $entry_ids = $this->getCopyrightEntryIDsSelectedForHarvesting();
126  return in_array($id, $entry_ids);
127  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ 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.

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

92  : bool
93  {
94  $types = $this->getObjectTypesSelectedForHarvesting();
95  return in_array($type, $types);
96  }
+ 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.

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

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:65
+ 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.

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

146  : void
147  {
148  $this->target_for_harvesting_ref_id = $ref_id;
149  $this->settings->set('target', (string) $ref_id);
150  }
$ref_id
Definition: ltiauth.php:65
+ 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.

References ILIAS\Repository\settings().

129  : void
130  {
131  $this->selected_cp_entry_ids = $ids;
132  $this->settings->set('templates', serialize($ids));
133  }
+ 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.

References ILIAS\Repository\settings().

98  : void
99  {
100  $this->selected_obj_types = $types;
101  $this->settings->set('collected_types', serialize($types));
102  }
+ 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.

◆ 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: