src/Contao/Dca/Palette/LegacyPalettesParser.php
public function parse(array $palettes, array $subPalettes = [], PaletteCollectionInterface $collection = null)
    {
        if (isset($palettes['__selector__'])) {
            $selectorFieldNames = $palettes['__selector__'];
            unset($palettes['__selector__']);
        } else {
            $selectorFieldNames = [];
        }

        return $this->parsePalettes(
            $palettes,
            $this->parseSubpalettes($subPalettes, $selectorFieldNames),
            $selectorFieldNames,
            $collection
        );
    }
public function parse(array $palettes, array $subPalettes = [], PaletteCollectionInterface $collection = null)
    {
        if (isset($palettes['__selector__'])) {
            $selectorFieldNames = $palettes['__selector__'];
            unset($palettes['__selector__']);
        } else {
            $selectorFieldNames = [];
        }

        return $this->parsePalettes(
            $palettes,
            $this->parseSubpalettes($subPalettes, $selectorFieldNames),
            $selectorFieldNames,
            $collection
        );
    }
public function parse ( array $ palettes , array $ subPalettes = [ ] , PaletteCollectionInterface $ collection = null ) { if ( isset ( $ palettes [ '__selector__' ] ) ) { $ selectorFieldNames = $ palettes [ '__selector__' ] ; unset ( $ palettes [ '__selector__' ] ) ; } else { $ selectorFieldNames = [ ] ; } return $ this -> parsePalettes ( $ palettes , $ this -> parseSubpalettes ( $ subPalettes , $ selectorFieldNames ) , $ selectorFieldNames , $ collection ) ; }
Parse the palette and sub palette array and create a complete palette collection.

@param array(string => string)         $palettes    The palettes from the DCA.
@param array(string => string)         $subPalettes The sub palettes from the DCA [optional].
@param PaletteCollectionInterface|null $collection  The palette collection to populate [optional].

@return PaletteCollectionInterface
Parse the palette and sub palette array and create a complete palette collection .