Add sets for gender and object form
This commit is contained in:
parent
abf69a00af
commit
a19f18a193
2
l18n
2
l18n
|
@ -1 +1 @@
|
||||||
Subproject commit 2305d2c78b71c5ecfdf56815102cbade8d9332ea
|
Subproject commit 5b72321de74d443356d1a0d5fb7b49927267a309
|
32
src/MDGenderSet.php
Normal file
32
src/MDGenderSet.php
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Contains a class for listing the possible genders.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains a class for listing the possible genders.
|
||||||
|
*/
|
||||||
|
final class MDGenderSet extends MDValueSet {
|
||||||
|
|
||||||
|
const GENDERS = [
|
||||||
|
'',
|
||||||
|
'female',
|
||||||
|
'male',
|
||||||
|
'gender',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a sorted 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::GENDERS, "gender_set", "gender_set");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
34
src/MDObjectFormSet.php
Normal file
34
src/MDObjectFormSet.php
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Contains a class for listing the possible forms for objects.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains a class for listing the possible forms for objects.
|
||||||
|
*/
|
||||||
|
final class MDObjectFormSet extends MDValueSet {
|
||||||
|
|
||||||
|
const FORMS = [
|
||||||
|
'',
|
||||||
|
'cube',
|
||||||
|
'cuboid',
|
||||||
|
'sphere',
|
||||||
|
'cone',
|
||||||
|
'cylinder',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a sorted 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::FORMS, "object_form_set", "object_form_set");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user