private function writePagingBar() { if (!$this->showPaging) { return; } if (!$this->pagingInfo->getTotalRows()) { return; } echo "<tr class=\"paging\">"; echo "<td colspan='20' style='text-align:right'>"; $this->writePageLinks(); echo "</td>"; echo "</tr>"; }
/** * Get the actual content published by this datatable. * This includes metadata regarding the total number of records, as well as * the actual content to be shown on the current page. * * @return Map - an associative array. */ public function getDocument() { $doc = array('sEcho' => $this->sEcho, 'iTotalRecords' => $this->totalRecords, 'iTotalDisplayRecords' => $this->pagingInfo->getTotalRows(), 'aaData' => $this->entries); return $doc; }
/** * @covers PagingInfo::getTotalRows */ public function testGetTotalRows() { $this->paging->setTotalRows(12); $this->assertSame(12, $this->paging->getTotalRows()); }