Add value sets for event / appointment status, attendance mode, and appointment and
exhibition contributor roles
This commit is contained in:
parent
91bf28ae96
commit
af10f52738
38
src/MDAppointmentAttendanceModeSet.php
Normal file
38
src/MDAppointmentAttendanceModeSet.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?PHP
|
||||
/**
|
||||
* Contains a class for controlling the list of available attendance modes
|
||||
* to appointment / event.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Class containing available attendance modes.
|
||||
*/
|
||||
final class MDAppointmentAttendanceModeSet extends MDValueSet {
|
||||
|
||||
const MODES = [
|
||||
'offline',
|
||||
'online',
|
||||
'mixed',
|
||||
];
|
||||
|
||||
const MODES_TO_SCHEMA_ORG = [
|
||||
'offline' => 'https://schema.org/OfflineEventAttendanceMode',
|
||||
'online' => 'https://schema.org/OnlineEventAttendanceMode',
|
||||
'mixed' => 'https://schema.org/MixedEventAttendanceMode',
|
||||
];
|
||||
|
||||
/**
|
||||
* Gets a list of the entries in a translated version.
|
||||
*
|
||||
* @param MDTlLoader $tlLoader Translation loader.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function getSortedList(MDTlLoader $tlLoader):array {
|
||||
return parent::getTlSortedList($tlLoader, self::AVAILABLE_ROLES, "appointment_attendance_modes", "appointment_attendance_modes");
|
||||
|
||||
}
|
||||
}
|
31
src/MDAppointmentContributorsSet.php
Normal file
31
src/MDAppointmentContributorsSet.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?PHP
|
||||
/**
|
||||
* Contains a class for controlling the list of available contributor types
|
||||
* to appointment / event.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Class containing available contributor roles.
|
||||
*/
|
||||
final class MDAppointmentContributorsSet extends MDValueSet {
|
||||
|
||||
const AVAILABLE_ROLES = [
|
||||
'organizer',
|
||||
'presenter',
|
||||
];
|
||||
|
||||
/**
|
||||
* Gets a list of the entries in a translated version.
|
||||
*
|
||||
* @param MDTlLoader $tlLoader Translation loader.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function getSortedList(MDTlLoader $tlLoader):array {
|
||||
return parent::getTlSortedList($tlLoader, self::AVAILABLE_ROLES, "appointment_contributor_roles", "appointment_contributor_roles");
|
||||
|
||||
}
|
||||
}
|
39
src/MDAppointmentStatusSet.php
Normal file
39
src/MDAppointmentStatusSet.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?PHP
|
||||
/**
|
||||
* Contains a class for controlling the list of available statuses to appointment / event.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Class containing available status.
|
||||
*/
|
||||
final class MDAppointmentStatusSet extends MDValueSet {
|
||||
|
||||
const STATUS = [
|
||||
'scheduled',
|
||||
'cancelled',
|
||||
'moved_online',
|
||||
'postponed',
|
||||
];
|
||||
|
||||
const STATUS_TO_SCHEMA_ORG = [
|
||||
'scheduled' => 'https://schema.org/EventScheduled',
|
||||
'cancelled' => 'https://schema.org/EventCancelled',
|
||||
'moved_online' => 'https://schema.org/EventMovedOnline',
|
||||
'postponed' => 'https://schema.org/EventPostponed',
|
||||
];
|
||||
|
||||
/**
|
||||
* Gets a list of the entries in a translated version.
|
||||
*
|
||||
* @param MDTlLoader $tlLoader Translation loader.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function getSortedList(MDTlLoader $tlLoader):array {
|
||||
return parent::getTlSortedList($tlLoader, self::STATUS, "appointment_status", "appointment_status");
|
||||
|
||||
}
|
||||
}
|
34
src/MDExhibitionContributorsSet.php
Normal file
34
src/MDExhibitionContributorsSet.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?PHP
|
||||
/**
|
||||
* Contains a class for controlling the list of available contributor types
|
||||
* to exhibitions.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Class containing available contributor roles.
|
||||
*/
|
||||
final class MDExhibitionContributorsSet extends MDValueSet {
|
||||
|
||||
const AVAILABLE_ROLES = [
|
||||
'concept',
|
||||
'curator',
|
||||
'design',
|
||||
'coordinator',
|
||||
'protagonist',
|
||||
];
|
||||
|
||||
/**
|
||||
* Gets a list of the entries in a translated version.
|
||||
*
|
||||
* @param MDTlLoader $tlLoader Translation loader.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
public static function getSortedList(MDTlLoader $tlLoader):array {
|
||||
return parent::getTlSortedList($tlLoader, self::AVAILABLE_ROLES, "exhibition_contributor_roles", "exhibition_contributor_roles");
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user