public static OptGroup::flattenOptions(array $array)
Allows PHP array processing of multiple select options with the same value.
Used for form select elements which need to validate HTML option groups and multiple options which may return the same value. Associative PHP arrays cannot handle these structures, since they share a common key.
array $array: The form options array to process.
array An array with all hierarchical elements flattened to a single array.
public static function flattenOptions(array $array) { $options = array(); static::doFlattenOptions($array, $options); return $options; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!OptGroup.php/function/OptGroup::flattenOptions/8.1.x