Exemplo n.º 1
0
 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());
 }