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);
                }
            }
        }
    }