Add function for loading collection areas from array
This commit is contained in:
parent
69c2c7cbf9
commit
c907c1b085
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user