removeCondition() public method

Remove conditions.
public removeCondition ( Condition $conditions )
$conditions Condition
Example #1
0
 /**
  * Removes conditions from condition groups when they are not in the given array.
  *
  * @param ConditionGroupEntity $conditionGroup
  * @param array $conditionIds
  */
 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);
         }
     }
 }