Neos\Neos\Service\NodeTypeSchemaBuilder::flattenAlohaFormatOptions PHP Метод

flattenAlohaFormatOptions() защищенный Метод

In order to allow unsetting options via the YAML settings merging, the formatting options can be set via 'option': TRUE, however, the frontend schema expects a flattened plain numeric array. This methods adjust the setting accordingly.
protected flattenAlohaFormatOptions ( array &$options ) : void
$options array The options array, passed by reference
Результат void
    protected function flattenAlohaFormatOptions(array &$options)
    {
        if (isset($options['properties'])) {
            foreach (array_keys($options['properties']) as $propertyName) {
                if (isset($options['properties'][$propertyName]['ui']['aloha'])) {
                    foreach ($options['properties'][$propertyName]['ui']['aloha'] as $formatGroup => $settings) {
                        if (!is_array($settings) || in_array($formatGroup, array('formatlesspaste'))) {
                            continue;
                        }
                        $flattenedSettings = array();
                        foreach ($settings as $key => $option) {
                            if (is_numeric($key) && is_string($option)) {
                                $flattenedSettings[] = $option;
                            } elseif ($option === true) {
                                $flattenedSettings[] = $key;
                            }
                        }
                        $options['properties'][$propertyName]['ui']['aloha'][$formatGroup] = $flattenedSettings;
                    }
                }
            }
        }
    }