private function addCondition(PropertyInterface $property, ConditionInterface $condition)
    {
        $chain = $property->getVisibleCondition();
        if (!($chain
            && ($chain instanceof PropertyConditionChain)
            && $chain->getConjunction() == PropertyConditionChain::AND_CONJUNCTION
        )
        ) {
            if ($property->getVisibleCondition()) {
                $previous = array($property->getVisibleCondition());
            } else {
                $previous = array();
            }

            $chain = new PropertyConditionChain(
                $previous,
                PropertyConditionChain::AND_CONJUNCTION
            );

            $property->setVisibleCondition($chain);
        }

        $chain->addCondition($condition);
    }
private function addCondition(PropertyInterface $property, ConditionInterface $condition)
    {
        $chain = $property->getVisibleCondition();
        if (!($chain
            && ($chain instanceof PropertyConditionChain)
            && $chain->getConjunction() == PropertyConditionChain::AND_CONJUNCTION
        )
        ) {
            if ($property->getVisibleCondition()) {
                $previous = array($property->getVisibleCondition());
            } else {
                $previous = array();
            }

            $chain = new PropertyConditionChain(
                $previous,
                PropertyConditionChain::AND_CONJUNCTION
            );

            $property->setVisibleCondition($chain);
        }

        $chain->addCondition($condition);
    }
private function addCondition ( PropertyInterface $ property , ConditionInterface $ condition ) { $ chain = $ property -> getVisibleCondition ( ) ; if ( ! ( $ chain && ( $ chain instanceof PropertyConditionChain ) && $ chain -> getConjunction ( ) == PropertyConditionChain :: AND_CONJUNCTION ) ) { if ( $ property -> getVisibleCondition ( ) ) { $ previous = array ( $ property -> getVisibleCondition ( ) ) ; } else { $ previous = array ( ) ; } $ chain = new PropertyConditionChain ( $ previous , PropertyConditionChain :: AND_CONJUNCTION ) ; $ property -> setVisibleCondition ( $ chain ) ; } $ chain -> addCondition ( $ condition ) ; }
Add a visible condition.

@param PropertyInterface  $property  The property.

@param ConditionInterface $condition The condition to add.

@return void
Add a visible condition .