src/Contao/Dca/Palette/LegacyPalettesParser.php
public function parseSubpalettes(array $subpalettes, array $selectorFieldNames = [])
    {
        $properties = [];
        foreach ($subpalettes as $subPaletteSelector => $childFields) {
            // Child fields list must be a string.
            if (!\is_string($childFields)) {
                continue;
            }

            $selectorFieldName = $this->createSubpaletteSelectorFieldName($subPaletteSelector, $selectorFieldNames);

            $selectorProperty = [];
            // For selectable sub selector.
            if (isset($properties[$selectorFieldName])
                && (0 < \substr_count($subPaletteSelector, '_'))
            ) {
                $selectorProperty = $properties[$selectorFieldName];
            }

            $properties[$selectorFieldName] = $this->parseSubpalette(
                $subPaletteSelector,
                $childFields,
                $selectorFieldNames,
                $selectorProperty
            );
        }

        return $properties;
    }
public function parseSubpalettes(array $subpalettes, array $selectorFieldNames = [])
    {
        $properties = [];
        foreach ($subpalettes as $subPaletteSelector => $childFields) {
            // Child fields list must be a string.
            if (!\is_string($childFields)) {
                continue;
            }

            $selectorFieldName = $this->createSubpaletteSelectorFieldName($subPaletteSelector, $selectorFieldNames);

            $selectorProperty = [];
            // For selectable sub selector.
            if (isset($properties[$selectorFieldName])
                && (0 < \substr_count($subPaletteSelector, '_'))
            ) {
                $selectorProperty = $properties[$selectorFieldName];
            }

            $properties[$selectorFieldName] = $this->parseSubpalette(
                $subPaletteSelector,
                $childFields,
                $selectorFieldNames,
                $selectorProperty
            );
        }

        return $properties;
    }
public function parseSubpalettes ( array $ subpalettes , array $ selectorFieldNames = [ ] ) { $ properties = [ ] ; foreach ( $ subpalettes as $ subPaletteSelector => $ childFields ) { // Child fields list must be a string. if ( ! \ is_string ( $ childFields ) ) { continue ; } $ selectorFieldName = $ this -> createSubpaletteSelectorFieldName ( $ subPaletteSelector , $ selectorFieldNames ) ; $ selectorProperty = [ ] ; // For selectable sub selector. if ( isset ( $ properties [ $ selectorFieldName ] ) && ( 0 < \ substr_count ( $ subPaletteSelector , '_' ) ) ) { $ selectorProperty = $ properties [ $ selectorFieldName ] ; } $ properties [ $ selectorFieldName ] = $ this -> parseSubpalette ( $ subPaletteSelector , $ childFields , $ selectorFieldNames , $ selectorProperty ) ; } return $ properties ; }
Parse the sub palettes and return the properties for each selector property.

@param array $subpalettes        The sub palettes to parse.
@param array $selectorFieldNames Names of the selector properties [optional].

@return array(string => PropertyInterface[])
Parse the sub palettes and return the properties for each selector property .