+ /** Helper function, calls buildFilter with the adequate condition/orders.
+ * @param $orders Additional orders to use before the default ones.
+ * @return A newly created PlFilter.
+ */
+ private function buildFilterHelper($orders = array(), $extra_cond=null)
+ {
+ if (!is_array($orders)) {
+ $orders = array($orders);
+ }
+ $orders = array_merge($orders, $this->orders);
+
+ if ($extra_cond != null) {
+ $conds = clone $this->conds;
+ $conds->addChild($extra_cond);
+ } else {
+ $conds = $this->conds;
+ }
+ return $this->buildFilter($conds, $orders);
+ }
+