private function addCondition($property, $condition)
    {
        $currentCondition = $property->getVisibleCondition();
        if ((!($currentCondition instanceof ConditionChainInterface))
            || ($currentCondition->getConjunction() != ConditionChainInterface::OR_CONJUNCTION)
        ) {
            if ($currentCondition === null) {
                $currentCondition = new PropertyConditionChain([$condition]);
            } else {
                $currentCondition = new PropertyConditionChain([$currentCondition, $condition]);
            }
            $currentCondition->setConjunction(ConditionChainInterface::OR_CONJUNCTION);
            $property->setVisibleCondition($currentCondition);
        } else {
            $currentCondition->addCondition($condition);
        }
    }
private function addCondition($property, $condition)
    {
        $currentCondition = $property->getVisibleCondition();
        if ((!($currentCondition instanceof ConditionChainInterface))
            || ($currentCondition->getConjunction() != ConditionChainInterface::OR_CONJUNCTION)
        ) {
            if ($currentCondition === null) {
                $currentCondition = new PropertyConditionChain([$condition]);
            } else {
                $currentCondition = new PropertyConditionChain([$currentCondition, $condition]);
            }
            $currentCondition->setConjunction(ConditionChainInterface::OR_CONJUNCTION);
            $property->setVisibleCondition($currentCondition);
        } else {
            $currentCondition->addCondition($condition);
        }
    }
private function addCondition ( $ property , $ condition ) { $ currentCondition = $ property -> getVisibleCondition ( ) ; if ( ( ! ( $ currentCondition instanceof ConditionChainInterface ) ) || ( $ currentCondition -> getConjunction ( ) != ConditionChainInterface :: OR_CONJUNCTION ) ) { if ( $ currentCondition === null ) { $ currentCondition = new PropertyConditionChain ( [ $ condition ] ) ; } else { $ currentCondition = new PropertyConditionChain ( [ $ currentCondition , $ condition ] ) ; } $ currentCondition -> setConjunction ( ConditionChainInterface :: OR_CONJUNCTION ) ; $ property -> setVisibleCondition ( $ currentCondition ) ; } else { $ currentCondition -> addCondition ( $ condition ) ; } }
Add a condition to a property.

@param PropertyInterface  $property  The property.

@param ConditionInterface $condition The condition to add.

@return void
Add a condition to a property .