/** * Merges two filters (filter supplied as parameter overwrites order and limit * params of this filter) * * @param ARSelectFilter $filter */ public function merge(ARSelectFilter $filter) { if ($filter->isConditionSet()) { $this->mergeCondition($filter->getCondition()); } if ($filter->isHavingConditionSet()) { $this->mergeHavingCondition($filter->getHavingCondition()); } $this->setFieldOrder($filter->getFieldOrder()); $this->setLimit($filter->getLimit(), $filter->getOffset()); $groupings = $filter->getGroupingFields(); $this->fieldListForGroup = array_merge($this->getGroupingFields(), $groupings); $joins = $filter->getJoinList(); $this->joinList = array_merge($this->joinList, $joins); $fields = $filter->getFieldList(); $this->fieldList = array_merge($this->fieldList, $fields); }