public function applyOrder(BaseCollection &$collection) { if (isset($this->data['orderBy']) && $this->data['orderBy']) { foreach ($this->data['orderBy'] as $o) { $collection->orderBy($o[0], $o[1]); } } }