Changeset View
Changeset View
Standalone View
Standalone View
src/applications/uiexample/examples/PhabricatorPagerUIExample.php
| Show All 17 Lines | public function renderExample() { | ||||
| $offset = (int)$request->getInt('offset'); | $offset = (int)$request->getInt('offset'); | ||||
| $page_size = 20; | $page_size = 20; | ||||
| $item_count = 173; | $item_count = 173; | ||||
| $rows = array(); | $rows = array(); | ||||
| for ($ii = $offset; $ii < min($item_count, $offset + $page_size); $ii++) { | for ($ii = $offset; $ii < min($item_count, $offset + $page_size); $ii++) { | ||||
| $rows[] = array( | $rows[] = array( | ||||
| 'Item #'.($ii + 1), | pht('Item #%d', $ii + 1), | ||||
| ); | ); | ||||
| } | } | ||||
| $table = new AphrontTableView($rows); | $table = new AphrontTableView($rows); | ||||
| $table->setHeaders( | $table->setHeaders( | ||||
| array( | array( | ||||
| 'Item', | 'Item', | ||||
| )); | )); | ||||
| ▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines | |||||