protected function setOrderAndSegmentation() { $this->setExternalSorting(true); $this->setExternalSegmentation(true); if (!$this->getDefaultOrderField()) { $this->setDefaultOrderField($this->active_record_list->getAR()->getArFieldList()->getPrimaryField()->getName()); } $this->determineLimit(); $this->determineOffsetAndOrder(); $this->setMaxCount($this->active_record_list->count()); $this->active_record_list->orderBy($this->getOrderField(), $this->getOrderDirection()); $this->active_record_list->limit($this->getOffset(), $this->getLimit()); }
/** * @param $start * @param $end * * @return ActiveRecordList */ public static function limit($start, $end) { $srModelObjectList = new ActiveRecordList(self::getCalledClass()); $srModelObjectList->limit($start, $end); return $srModelObjectList; }