Add function for loading collection areas from array

This commit is contained in:
Joshua Ramon Enslin 2024-05-23 00:35:57 +02:00
parent 69c2c7cbf9
commit c907c1b085
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -77,6 +77,23 @@ enum MDInstitutionCollectionArea implements MDValueEnumInterface, JsonSerializab
} }
/**
* Returns instances of MDInstitutionCollectionArea based on list of strings.
*
* @param list<string> $input Input to get a value from.
*
* @return list<MDInstitutionCollectionArea>
*/
public static function fromStrings(array $input):array {
$output = [];
foreach ($input as $value) {
$output[] = self::fromString($value);
}
return $output;
}
/** /**
* Returns a value of this type based on an integer. * Returns a value of this type based on an integer.
* *