protected function _flattenValueOptions(array $options)
    {
        $flatOptions = $options;
        if (is_array(current($options))) {
            $flatOptions = [];
            foreach ($options as $group => $valueGroup) {
                $flatOptions = $flatOptions + $valueGroup;
            }
        }

        return $flatOptions;
    }
protected function _flattenValueOptions(array $options)
    {
        $flatOptions = $options;
        if (is_array(current($options))) {
            $flatOptions = [];
            foreach ($options as $group => $valueGroup) {
                $flatOptions = $flatOptions + $valueGroup;
            }
        }

        return $flatOptions;
    }
protected function _flattenValueOptions ( array $ options ) { $ flatOptions = $ options ; if ( is_array ( current ( $ options ) ) ) { $ flatOptions = [ ] ; foreach ( $ options as $ group => $ valueGroup ) { $ flatOptions = $ flatOptions + $ valueGroup ; } } return $ flatOptions ; }
Make sure options arrays are flattened and consolidated before they are used for value
checking. This applies to optgroup-style arrays currently

@param array $options Options Config
@return array
Make sure options arrays are flattened and consolidated before they are used for value checking . This applies to optgroup - style arrays currently