public static function YamlFormOptions::hasOptGroup in YAML Form 8
Determine if options array contains an OptGroup.
Parameters
array $options: An array of options.
Return value
bool TRUE if options array contains an OptGroup.
2 calls to YamlFormOptions::hasOptGroup()
- YamlFormOptions::processYamlFormOptions in src/Element/ YamlFormOptions.php 
- Process options and build options widget.
- YamlFormOptions::valueCallback in src/Element/ YamlFormOptions.php 
- Determines how user input is mapped to an element's #value property.
File
- src/Element/ YamlFormOptions.php, line 199 
Class
- YamlFormOptions
- Provides a form element to assist in creation of options.
Namespace
Drupal\yamlform\ElementCode
public static function hasOptGroup(array $options) {
  foreach ($options as $option_text) {
    if (is_array($option_text)) {
      return TRUE;
    }
  }
  return FALSE;
}