MDAllowedValueSets/src/MDAppointmentStatusSet.php

40 lines
1.0 KiB
PHP

<?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");
}
}