Compare commits
3 Commits
645cd6f687
...
dbc7d01de4
Author | SHA1 | Date | |
---|---|---|---|
dbc7d01de4
|
|||
c4a95ea511
|
|||
dd426509b6
|
2
l18n
2
l18n
Submodule l18n updated: 812a27ec0b...2c74a458f3
@ -31,5 +31,4 @@ final class MDConservationReportTypeSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::REPORT_TYPES, "conservation_report_type_set", "conservation_report_type_set");
|
return parent::getTlSortedList($tlLoader, self::REPORT_TYPES, "conservation_report_type_set", "conservation_report_type_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,5 +38,4 @@ final class MDCurrenciesSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::CURRENCIES, "currencies_set", "currencies_set");
|
return parent::getTlSortedList($tlLoader, self::CURRENCIES, "currencies_set", "currencies_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,5 +43,4 @@ final class MDEntryTypesSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::ENTRY_TYPES, "entry_types", "entry_types");
|
return parent::getTlSortedList($tlLoader, self::ENTRY_TYPES, "entry_types", "entry_types");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -89,5 +89,4 @@ final class MDEventsSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
return parent::getTlSortedList($tlLoader, self::EVENT_IDS, "eventtype_name", "eventname");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,10 @@ final class MDLicensesSet extends MDValueSet {
|
|||||||
* @return string|boolean
|
* @return string|boolean
|
||||||
*/
|
*/
|
||||||
final public static function checkLicenseAvailable(string $license) {
|
final public static function checkLicenseAvailable(string $license) {
|
||||||
if (isset(self::AVAILABLE_LICENSES[$license])) return self::AVAILABLE_LICENSES[$license];
|
if (isset(self::AVAILABLE_LICENSES[$license])) {
|
||||||
|
return self::AVAILABLE_LICENSES[$license];
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,4 @@ final class MDMarkingTypesSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::MARKING_TYPES, "marking_types", "marking_types");
|
return parent::getTlSortedList($tlLoader, self::MARKING_TYPES, "marking_types", "marking_types");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,4 @@ final class MDObjectPositionsSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::POSITIONS, "position_set", "position_set");
|
return parent::getTlSortedList($tlLoader, self::POSITIONS, "position_set", "position_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,4 @@ final class MDObjectPublicationBackgrounds extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::PUBLICATION_BACKGROUNDS, "object_publication_background", "object_publication_background");
|
return parent::getTlSortedList($tlLoader, self::PUBLICATION_BACKGROUNDS, "object_publication_background", "object_publication_background");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,5 +34,4 @@ final class MDPlacetypesSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::PLACE_TYPE_IDS, "placetypes", "tlPlacetypes");
|
return parent::getTlSortedList($tlLoader, self::PLACE_TYPE_IDS, "placetypes", "tlPlacetypes");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
33
src/MDPodcastContributorsSet.php
Normal file
33
src/MDPodcastContributorsSet.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Contains a class for controlling the list of available contributor types
|
||||||
|
* to podcasts.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class containing available place types.
|
||||||
|
*/
|
||||||
|
final class MDPodcastContributorsSet extends MDValueSet {
|
||||||
|
|
||||||
|
const AVAILABLE_ROLES = [
|
||||||
|
'onair',
|
||||||
|
'organization',
|
||||||
|
'recording',
|
||||||
|
'technical_support',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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, "podcast_contributor_roles", "podcast_contributor_roles");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -32,5 +32,4 @@ final class MDSourceTypeSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::SOURCE_TYPES, "source_type_set", "source_type_set");
|
return parent::getTlSortedList($tlLoader, self::SOURCE_TYPES, "source_type_set", "source_type_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -30,5 +30,4 @@ final class MDTitleTypesSet extends MDValueSet {
|
|||||||
return parent::getTlSortedList($tlLoader, self::TITLE_TYPES, "title_types_set", "title_types_set");
|
return parent::getTlSortedList($tlLoader, self::TITLE_TYPES, "title_types_set", "title_types_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -37,5 +37,4 @@ final class MDUnitsSet extends MDValueSet {
|
|||||||
return parent::getTlUnsortedList($tlLoader, self::UNITS_WEIGHT, "units_weight_set", "units_weight_set");
|
return parent::getTlUnsortedList($tlLoader, self::UNITS_WEIGHT, "units_weight_set", "units_weight_set");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@ declare(strict_types = 1);
|
|||||||
* Generic class for value sets.
|
* Generic class for value sets.
|
||||||
*/
|
*/
|
||||||
class MDValueSet {
|
class MDValueSet {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an unsorted array based on provided keys and their translations.
|
* Gets an unsorted array based on provided keys and their translations.
|
||||||
*
|
*
|
||||||
@ -25,8 +24,12 @@ class MDValueSet {
|
|||||||
|
|
||||||
$output = [];
|
$output = [];
|
||||||
foreach ($keyList as $tID) {
|
foreach ($keyList as $tID) {
|
||||||
if ($tID === "") $output[$tID] = "";
|
if ($tID === "") {
|
||||||
else $output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID);
|
$output[$tID] = "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$output[$tID] = $tlLoader->tl($tlFileName, $tlVarName, $tID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
@ -50,5 +53,4 @@ class MDValueSet {
|
|||||||
return $output;
|
return $output;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user