ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
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 ()
 
 getObjectTypesEligibleForPublishing ()
 
 getObjectTypesSelectedForPublishing ()
 
 isObjectTypeSelectedForPublishing (string $type)
 
 saveObjectTypesSelectedForPublishing (string ... $types)
 
 getCopyrightEntryIDsSelectedForPublishing ()
 
 isCopyrightEntryIDSelectedForPublishing (int $id)
 
 saveCopyrightEntryIDsSelectedForPublishing (int ... $ids)
 
 isEditorialStepEnabled ()
 
 saveEditorialStepEnabled (bool $enabled)
 
 getContainerRefIDForEditorialStep ()
 
 saveContainerRefIDForEditorialStep (int $ref_id)
 
 getContainerRefIDForPublishing ()
 
 saveContainerRefIDForPublishing (int $ref_id)
 
 isManualPublishingEnabled ()
 
 saveManualPublishingEnabled (bool $enabled)
 
 isAutomaticPublishingEnabled ()
 
 saveAutomaticPublishingEnabled (bool $enabled)
 
 getObjectTypesEligibleForPublishing ()
 
 getObjectTypesSelectedForPublishing ()
 
 isObjectTypeSelectedForPublishing (string $type)
 
 saveObjectTypesSelectedForPublishing (string ... $types)
 
 getCopyrightEntryIDsSelectedForPublishing ()
 
 isCopyrightEntryIDSelectedForPublishing (int $id)
 
 saveCopyrightEntryIDsSelectedForPublishing (int ... $ids)
 
 isEditorialStepEnabled ()
 
 saveEditorialStepEnabled (bool $enabled)
 
 getContainerRefIDForEditorialStep ()
 
 saveContainerRefIDForEditorialStep (int $ref_id)
 
 getContainerRefIDForPublishing ()
 
 saveContainerRefIDForPublishing (int $ref_id)
 
 isManualPublishingEnabled ()
 
 saveManualPublishingEnabled (bool $enabled)
 
 isAutomaticPublishingEnabled ()
 
 saveAutomaticPublishingEnabled (bool $enabled)
 

Protected Attributes

const string STORAGE_IDENTIFIER = 'meta_oer'
 
const array ELIGIBLE_TYPES
 
ilSetting $settings
 
array $selected_obj_types
 
array $selected_cp_entry_ids
 
bool $editorial_step_enabled
 
int $editorial_ref_id
 
int $source_for_exposing_ref_id
 
bool $manual_publishing_enabled
 
bool $automatic_publishing_enabled
 

Detailed Description

Definition at line 23 of file Settings.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 61 of file Settings.php.

62 {
63 $this->settings = new \ilSetting(self::STORAGE_IDENTIFIER);
64 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ getContainerRefIDForEditorialStep()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 155 of file Settings.php.

155 : int
156 {
157 if (isset($this->editorial_ref_id)) {
159 }
160 return $this->editorial_ref_id = (int) $this->settings->get(
161 'target',
162 '0'
163 );
164 }

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

+ Here is the call graph for this function:

◆ getContainerRefIDForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 172 of file Settings.php.

172 : int
173 {
174 if (isset($this->source_for_exposing_ref_id)) {
176 }
177 return $this->source_for_exposing_ref_id = (int) $this->settings->get(
178 'exposed_container',
179 '0'
180 );
181 }

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:

◆ getCopyrightEntryIDsSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 110 of file Settings.php.

110 : array
111 {
112 if (isset($this->selected_cp_entry_ids)) {
114 }
115 $ids_from_storage = unserialize(
116 $this->settings->get('templates', serialize([])),
117 ['allowed_classes' => false]
118 );
119 $this->selected_cp_entry_ids = [];
120 foreach ($ids_from_storage as $id) {
121 $this->selected_cp_entry_ids[] = (int) $id;
122 }
124 }
$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\isCopyrightEntryIDSelectedForPublishing().

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

◆ getObjectTypesEligibleForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 69 of file Settings.php.

69 : array
70 {
72 }

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

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

+ Here is the caller graph for this function:

◆ getObjectTypesSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 77 of file Settings.php.

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

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

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

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

◆ isAutomaticPublishingEnabled()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 208 of file Settings.php.

208 : bool
209 {
210 if (isset($this->automatic_publishing_enabled)) {
212 }
213 return $this->automatic_publishing_enabled = (bool) $this->settings->get(
214 'automatic_publishing',
215 '0'
216 );
217 }

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

+ Here is the call graph for this function:

◆ isCopyrightEntryIDSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 126 of file Settings.php.

126 : bool
127 {
128 $entry_ids = $this->getCopyrightEntryIDsSelectedForPublishing();
129 return in_array($id, $entry_ids);
130 }

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

+ Here is the call graph for this function:

◆ isEditorialStepEnabled()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 138 of file Settings.php.

138 : bool
139 {
140 if (isset($this->editorial_step_enabled)) {
142 }
143 return $this->editorial_step_enabled = (bool) $this->settings->get(
144 'editorial_step',
145 '0'
146 );
147 }

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

+ Here is the call graph for this function:

◆ isManualPublishingEnabled()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 191 of file Settings.php.

191 : bool
192 {
193 if (isset($this->manual_publishing_enabled)) {
195 }
196 return $this->manual_publishing_enabled = (bool) $this->settings->get(
197 'manual_publishing',
198 '0'
199 );
200 }

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

+ Here is the call graph for this function:

◆ isObjectTypeSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 95 of file Settings.php.

95 : bool
96 {
98 return in_array($type, $types);
99 }

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

+ Here is the call graph for this function:

◆ saveAutomaticPublishingEnabled()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveAutomaticPublishingEnabled ( bool  $enabled)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 219 of file Settings.php.

219 : void
220 {
221 $this->editorial_step_enabled = $enabled;
222 $this->settings->set('automatic_publishing', $enabled ? '1' : '0');
223 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveContainerRefIDForEditorialStep()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 166 of file Settings.php.

166 : void
167 {
168 $this->editorial_ref_id = $ref_id;
169 $this->settings->set('target', (string) $ref_id);
170 }
$ref_id
Definition: ltiauth.php:66

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

+ Here is the call graph for this function:

◆ saveContainerRefIDForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 183 of file Settings.php.

183 : void
184 {
185 $this->source_for_exposing_ref_id = $ref_id;
186 $this->settings->set('exposed_container', (string) $ref_id);
187 }

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

+ Here is the call graph for this function:

◆ saveCopyrightEntryIDsSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 132 of file Settings.php.

132 : void
133 {
134 $this->selected_cp_entry_ids = $ids;
135 $this->settings->set('templates', serialize($ids));
136 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveEditorialStepEnabled()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveEditorialStepEnabled ( bool  $enabled)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 149 of file Settings.php.

149 : void
150 {
151 $this->editorial_step_enabled = $enabled;
152 $this->settings->set('editorial_step', $enabled ? '1' : '0');
153 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveManualPublishingEnabled()

ILIAS\MetaData\OERHarvester\Settings\Settings::saveManualPublishingEnabled ( bool  $enabled)

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 202 of file Settings.php.

202 : void
203 {
204 $this->editorial_step_enabled = $enabled;
205 $this->settings->set('manual_publishing', $enabled ? '1' : '0');
206 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ saveObjectTypesSelectedForPublishing()

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

Implements ILIAS\MetaData\OERHarvester\Settings\SettingsInterface.

Definition at line 101 of file Settings.php.

101 : void
102 {
103 $this->selected_obj_types = $types;
104 $this->settings->set('collected_types', serialize($types));
105 }

References ILIAS\Repository\settings().

+ Here is the call graph for this function:

Field Documentation

◆ $automatic_publishing_enabled

bool ILIAS\MetaData\OERHarvester\Settings\Settings::$automatic_publishing_enabled
protected

◆ $editorial_ref_id

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

◆ $editorial_step_enabled

bool ILIAS\MetaData\OERHarvester\Settings\Settings::$editorial_step_enabled
protected

◆ $manual_publishing_enabled

bool ILIAS\MetaData\OERHarvester\Settings\Settings::$manual_publishing_enabled
protected

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

◆ 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\getObjectTypesEligibleForPublishing().

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