src/CoreBundle/EventListener/DcGeneral/Table/RenderSetting/PaletteRestrictionListener.php
private function buildMetaPaletteConditions($palette, $metaPalettes)
    {
        foreach ($metaPalettes as $typeName => $paletteInfo) {
            if ('default' === $typeName) {
                continue;
            }

            if (preg_match('#^(\w+) extends (\w+)$#', $typeName, $matches)) {
                $typeName = $matches[1];
            }

            foreach ($paletteInfo as $legendName => $properties) {
                foreach ($properties as $propertyName) {
                    $condition = new AttributeByIdIsOfType($typeName, $this->connection, 'attr_id');
                    $legend    = $this->getLegend($legendName, $palette);
                    $property  = $this->getProperty($propertyName, $legend);
                    $this->addCondition($property, $condition);
                }
            }
        }
    }
private function buildMetaPaletteConditions($palette, $metaPalettes)
    {
        foreach ($metaPalettes as $typeName => $paletteInfo) {
            if ('default' === $typeName) {
                continue;
            }

            if (preg_match('#^(\w+) extends (\w+)$#', $typeName, $matches)) {
                $typeName = $matches[1];
            }

            foreach ($paletteInfo as $legendName => $properties) {
                foreach ($properties as $propertyName) {
                    $condition = new AttributeByIdIsOfType($typeName, $this->connection, 'attr_id');
                    $legend    = $this->getLegend($legendName, $palette);
                    $property  = $this->getProperty($propertyName, $legend);
                    $this->addCondition($property, $condition);
                }
            }
        }
    }
private function buildMetaPaletteConditions ( $ palette , $ metaPalettes ) { foreach ( $ metaPalettes as $ typeName => $ paletteInfo ) { if ( 'default' === $ typeName ) { continue ; } if ( preg_match ( '#^(\w+) extends (\w+)$#' , $ typeName , $ matches ) ) { $ typeName = $ matches [ 1 ] ; } foreach ( $ paletteInfo as $ legendName => $ properties ) { foreach ( $ properties as $ propertyName ) { $ condition = new AttributeByIdIsOfType ( $ typeName , $ this -> connection , 'attr_id' ) ; $ legend = $ this -> getLegend ( $ legendName , $ palette ) ; $ property = $ this -> getProperty ( $ propertyName , $ legend ) ; $ this -> addCondition ( $ property , $ condition ) ; } } } }
Apply conditions for meta palettes of the certain render setting types.

@param PaletteInterface $palette      The palette.
@param array            $metaPalettes The meta palette information.

@return void
Apply conditions for meta palettes of the certain render setting types .