Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

form_options_flatten() is a helper function for creating options suitable for HTML option groups.

This procedural function is now replaced by the flattenOptions() method in the \Drupal\Core\Form\OptGroup class.

It is called in the same way:


// Drupal 7
$flattened_options = form_options_flatten($options);

// Drupal 8
use Drupal\Core\Form\OptGroup;
$flattened_options = OptGroup::flattenOptions($options);
Impacts: 
Module developers