src/CoreBundle/EventListener/DcGeneral/Table/FilterSetting/SubPaletteSubscriber.php
private function getVisibleCondition($property)
    {
        $condition = $property->getVisibleCondition();
        if ($condition instanceof PropertyConditionChain) {
            return $condition;
        }

        $conditionChain = new PropertyConditionChain();
        $property->setVisibleCondition($conditionChain);

        if ($condition) {
            $conditionChain->addCondition($condition);
        }

        return $conditionChain;
    }
private function getVisibleCondition($property)
    {
        $condition = $property->getVisibleCondition();
        if ($condition instanceof PropertyConditionChain) {
            return $condition;
        }

        $conditionChain = new PropertyConditionChain();
        $property->setVisibleCondition($conditionChain);

        if ($condition) {
            $conditionChain->addCondition($condition);
        }

        return $conditionChain;
    }
Get the visible condition for a property. Create it if not exists.

@param PropertyInterface $property Palette property.

@return PropertyConditionChain