query; if (!is_null($this->sort)) { $query->orderBy($this->sort->getId(), $this->sort->getDirection()); } return $query; } }