コード例 #1
0
 public function tag()
 {
     $this->TagStr = $tag = Director::urlParam('ID');
     // page limits
     $paginator = new AbcPaginator(Taggable::$default_num_page_items);
     $dataSet = Taggable::getTaggedWith($tag, null, $paginator->start, $paginator->limit);
     $this->TagSet = $dataSet;
     // Supply template with pagination data
     $this->Paginator = $paginator->dataForTemplate($dataSet->unlimitedRowCount, 2);
     return array();
 }
コード例 #2
0
ファイル: Page.php プロジェクト: JamesWatling/bonethug
 public function PaginatedChildren($limit = null, $order = 'Created DESC', $hitsOptions = null)
 {
     if ($limit === null) {
         $limit = self::$hits_per_page;
     }
     $do = new DataObject();
     $do->DataSet = AbcPaginator::get($limit)->fetch('Page', "ParentID = " . $this->ID, $order);
     $do->Paginator = $do->DataSet->Paginator->dataForTemplate($do->DataSet->unlimitedRowCount, 2, null, $hitsOptions);
     $do->HitsSelector = $do->Paginator->HitsSelector;
     return $do;
 }