protected function buildMetaPaletteConditions($palette)
{
foreach ((array) $GLOBALS['TL_DCA']['tl_metamodel_rendersetting']['metapalettes'] as $typeName => $paletteInfo) {
if ($typeName == 'default') {
continue;
}
if (preg_match('#^(\\w+) extends (\\w+)$#', $typeName, $matches)) {
$typeName = $matches[1];
}
foreach ($paletteInfo as $legendName => $properties) {
foreach ($properties as $propertyName) {
$condition = new PropertyCondition($typeName);
$legend = $this->getLegend($legendName, $palette);
$property = $this->getProperty($propertyName, $legend);
$this->addCondition($property, $condition);
}
}
}
}