public function view() { if ($r = \Concrete\Package\Formify\Src\FormifyRecord::get($_GET['rID'][$this->bID])) { $records[] = $r; $template = \Concrete\Package\Formify\Src\FormifyTemplate::get($this->detailTemplateID); } elseif ($r = \Concrete\Package\Formify\Src\FormifyRecord::get($_GET['rID'][0])) { $records[] = $r; $template = \Concrete\Package\Formify\Src\FormifyTemplate::get($this->detailTemplateID); } elseif ($rs = \Concrete\Package\Formify\Src\FormifyRecordSet::get($this->fID)) { if ($this->requireApproval) { $rs->requireApproval(); } if ($this->requireOwnership) { $rs->requireOwnership(); } if ($this->sortBy) { $rs->setSortField($this->sortBy); } if ($this->sortOrder != '') { $rs->setSortOrder($this->sortOrder); } if ($_GET['ccm_paging_p'] == '') { $rs->setPage(1); } else { $rs->setPage(intval($_GET['ccm_paging_p'])); } $rs->setPageSize(intval($this->pageSize)); if ($this->includeExpired) { $rs->includeExpired(); } $records = $rs->getRecords(); $template = \Concrete\Package\Formify\Src\FormifyTemplate::get($this->listTemplateID); } if ($this->detailDestination == 'page' && intval($this->detailCID) > 0) { $template->setDetailCollectionID($this->detailCID); $template->setBlockID(0); } else { $template->setBlockID($this->bID); } if ($records && $template) { $this->set('records', $records); $this->set('template', $template); } if ($this->displayPaginator && intval($this->pageSize) > 0) { $fullRecordSet = $rs; $fullRecordSet->setPageSize(0); $fullRecordSet->clearRecords(); $allRecords = $fullRecordSet->getRecords(); if (count($allRecords) > count($records)) { $pageBase = Page::getCurrentPage()->getCollectionLink(); $paginator = $this->createPagination($pageBase, count($allRecords), $this->pageSize, $rs->getPage()); $this->set('paginator', $paginator); } } }
public function index($fID) { $rs = \Concrete\Package\Formify\Src\FormifyRecordSet::get($fID); $rs->setPageSize(0); foreach ($rs->getRecords() as $r) { $r->index(); } }