Add controlled lists of recording types and external hosting options
This commit is contained in:
parent
1abb36691f
commit
77ae0327c1
2
l18n
2
l18n
|
@ -1 +1 @@
|
||||||
Subproject commit 2c74a458f34b8d1976fe18361fe10ea535a94d00
|
Subproject commit 7d645afa2b7b6c88066adb4d76d79107635f55ab
|
20
src/MDExternalHostingSet.php
Normal file
20
src/MDExternalHostingSet.php
Normal 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',
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
32
src/MDRecordingTypesSet.php
Normal file
32
src/MDRecordingTypesSet.php
Normal 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");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user