src/Sulu/Bundle/ResourceBundle/Resource/FilterManager.php
protected function removeNonExistentConditions(
        $conditionGroup,
        $conditionIds
    ) {
        foreach ($conditionGroup->getConditions() as $condition) {
            if ($condition->getId() && !in_array($condition->getId(), $conditionIds)) {
                $conditionGroup->removeCondition($condition);
                $this->em->remove($condition);
            }
        }
    }
protected function removeNonExistentConditions(
        $conditionGroup,
        $conditionIds
    ) {
        foreach ($conditionGroup->getConditions() as $condition) {
            if ($condition->getId() && !in_array($condition->getId(), $conditionIds)) {
                $conditionGroup->removeCondition($condition);
                $this->em->remove($condition);
            }
        }
    }
protected function removeNonExistentConditions ( $ conditionGroup , $ conditionIds ) { foreach ( $ conditionGroup -> getConditions ( ) as $ condition ) { if ( $ condition -> getId ( ) && ! in_array ( $ condition -> getId ( ) , $ conditionIds ) ) { $ conditionGroup -> removeCondition ( $ condition ) ; $ this -> em -> remove ( $ condition ) ; } } }
Removes conditions from condition groups when they are not in the given array.

@param ConditionGroupEntity $conditionGroup
@param array $conditionIds
Removes conditions from condition groups when they are not in the given array .