19 declare(strict_types=1);
53 if (!$this->gateway->doesDeactivationEntryExistForSlot($slot)) {
54 $this->gateway->createDeactivationEntry($slot);
64 $this->gateway->deleteDeactivationEntry($slot);
69 return !$this->gateway->doesDeactivationEntryExistForSlot($slot);
74 if (!$this->assignments->doesSlotHaveValues($slot)) {
77 return $this->
factory->standard(
79 ...$this->assignments->valuesForSlot($slot)
88 foreach ($slots as $slot) {
89 if (!$this->assignments->doesSlotHaveValues($slot)) {
94 ...$this->assignments->valuesForSlot($slot)
104 foreach ($slots as $slot) {
106 !$this->assignments->doesSlotHaveValues($slot) ||
111 yield $this->
factory->standard(
113 ...$this->assignments->valuesForSlot($slot)
134 foreach ($vocabularies as $vocabulary) {
135 $vocab_values = array_merge(
137 iterator_to_array($vocabulary->values())
141 foreach ($values as $value) {
142 if (!in_array($value, $vocab_values,
true)) {
158 'ispartof' =>
'is_part_of',
'haspart' =>
'has_part',
159 'isversionof' =>
'is_version_of',
'hasversion' =>
'has_version',
160 'isformatof' =>
'is_format_of',
'hasformat' =>
'has_format',
161 'references' =>
'references',
162 'isreferencedby' =>
'is_referenced_by',
163 'isbasedon' =>
'is_based_on',
'isbasisfor' =>
'is_basis_for',
164 'requires' =>
'requires',
'isrequiredby' =>
'is_required_by',
165 'graphical designer' =>
'graphicaldesigner',
166 'technical implementer' =>
'technicalimplementer',
167 'content provider' =>
'contentprovider',
168 'technical validator' =>
'technicalvalidator',
169 'educational validator' =>
'educationalvalidator',
170 'script writer' =>
'scriptwriter',
171 'instructional designer' =>
'instructionaldesigner',
172 'subject matter expert' =>
'subjectmatterexpert',
173 'diagram' =>
'diagramm' 175 if (array_key_exists($value, $exceptions)) {
176 $value = $exceptions[$value];
179 return $presentation_utilities->txt(
'meta_' . $this->
fillSpaces($value));
184 $string = preg_replace(
'/(?<=[a-z])(?=[A-Z])/',
' ', $string);
185 return strtolower($string);
190 $string = str_replace(
' ',
'_', $string);
191 return strtolower($string);
197 SlotIdentifier::GENERAL_STRUCTURE,
198 SlotIdentifier::GENERAL_AGGREGATION_LEVEL,
199 SlotIdentifier::LIFECYCLE_STATUS,
200 SlotIdentifier::LIFECYCLE_CONTRIBUTE_ROLE,
201 SlotIdentifier::METAMETADATA_CONTRIBUTE_ROLE,
202 SlotIdentifier::TECHNICAL_REQUIREMENT_TYPE,
203 SlotIdentifier::TECHNICAL_REQUIREMENT_BROWSER,
204 SlotIdentifier::TECHNICAL_REQUIREMENT_OS,
205 SlotIdentifier::EDUCATIONAL_INTERACTIVITY_TYPE,
206 SlotIdentifier::EDUCATIONAL_LEARNING_RESOURCE_TYPE,
207 SlotIdentifier::EDUCATIONAL_INTERACTIVITY_LEVEL,
208 SlotIdentifier::EDUCATIONAL_SEMANTIC_DENSITY,
209 SlotIdentifier::EDCUCATIONAL_INTENDED_END_USER_ROLE,
210 SlotIdentifier::EDUCATIONAL_CONTEXT,
211 SlotIdentifier::EDUCATIONAL_DIFFICULTY,
212 SlotIdentifier::RIGHTS_COST,
213 SlotIdentifier::RIGHTS_CP_AND_OTHER_RESTRICTIONS,
214 SlotIdentifier::RELATION_KIND,
215 SlotIdentifier::CLASSIFICATION_PURPOSE
218 return in_array($slot, $valid_slots,
true);