Add controlled lists of recording types and external hosting options

This commit is contained in:
Joshua Ramon Enslin 2021-03-12 20:35:49 +01:00
parent 1abb36691f
commit 77ae0327c1
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 53 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit 2c74a458f34b8d1976fe18361fe10ea535a94d00
Subproject commit 7d645afa2b7b6c88066adb4d76d79107635f55ab

View File

@ -0,0 +1,20 @@
<?PHP
/**
* Contains a class for controlling the list of available external sources.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing available external sources.
*/
final class MDExternalHostingSet extends MDValueSet {
const DEFAULT_EXTERNAL_HOSTING = 'Archive.org';
const EXTERNAL_SOURCES = [
'Archive.org',
];
}

View File

@ -0,0 +1,32 @@
<?PHP
/**
* Contains a class for controlling the list of available recording types.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing available recording types.
*/
final class MDRecordingTypesSet extends MDValueSet {
const DEFAULT_RECORDING_TYPE = 'audio';
const RECORDING_TYPES = [
'audio',
'video',
];
/**
* 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::RECORDING_TYPES, "recording_types_set", "recording_types_set");
}
}