Add MDActorVariantTypesSet for controlling variant types for actor names

This commit is contained in:
Joshua Ramon Enslin 2021-08-19 00:44:15 +02:00
parent ce35fd35cd
commit db240f9d3d
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 37 additions and 1 deletions

2
l18n

@ -1 +1 @@
Subproject commit 1281aec3b152b85577ca709564736df3cc963cd3
Subproject commit cfaa40ef385d3833f012071238463b8f8c155b94

View File

@ -0,0 +1,36 @@
<?PHP
/**
* Class containing available types for actor name variants. E.g. birth names,
* married names, etc.
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Class containing available types for actor name variants. E.g. birth names,
* married names, etc.
*/
final class MDActorVariantTypesSet extends MDValueSet {
const ACTOR_VARIANT_TYPES = [
'',
'birth_name',
'married_name',
'monastic_name',
'pseudonym',
'regnal_name',
];
/**
* Returns a translated list of name variants.
*
* @param MDTlLoader $tlLoader Translation loader.
*
* @return array<string>
*/
public static function getActorVariantTypesTLed(MDTlLoader $tlLoader):array {
return parent::getTlUnsortedList($tlLoader, self::ACTOR_VARIANT_TYPES, "actor_variant_types_set", "actor_variant_types_set");
}
}