public function setParentTableVisibility(BuildDataDefinitionEvent $event)
{
foreach ($event->getContainer()->getPalettesDefinition()->getPalettes() as $palette) {
foreach ($palette->getProperties() as $property) {
if ($property->getName() != 'ptable') {
continue;
}
$chain = $property->getVisibleCondition();
if (!($chain && $chain instanceof PropertyConditionChain && $chain->getConjunction() == PropertyConditionChain::AND_CONJUNCTION)) {
$chain = new PropertyConditionChain(array($property->getVisibleCondition()), PropertyConditionChain::AND_CONJUNCTION);
$property->setVisibleCondition($chain);
}
$chain->addCondition(new PropertyValueCondition('rendertype', 'ctable'));
}
}
}