1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/phlux/controller/PhluxListController.php
epriestley 46d9bebc84 Remove all device = true from page construction
Summary: Fixes T5446. Depends on D9687.

Test Plan: Mostly regexp'd this. Lint doesn't complain.

Reviewers: chad

Reviewed By: chad

Subscribers: epriestley, hach-que

Maniphest Tasks: T5446

Differential Revision: https://secure.phabricator.com/D9690
2014-06-23 15:18:14 -07:00

47 lines
1.1 KiB
PHP

<?php
final class PhluxListController extends PhluxController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$pager = new AphrontCursorPagerView();
$pager->readFromRequest($request);
$query = id(new PhluxVariableQuery())
->setViewer($user);
$vars = $query->executeWithCursorPager($pager);
$view = new PHUIObjectItemListView();
foreach ($vars as $var) {
$key = $var->getVariableKey();
$item = new PHUIObjectItemView();
$item->setHeader($key);
$item->setHref($this->getApplicationURI('/view/'.$key.'/'));
$item->addIcon(
'none',
phabricator_datetime($var->getDateModified(), $user));
$view->addItem($item);
}
$crumbs = $this->buildApplicationCrumbs();
$title = pht('Variable List');
$crumbs->addTextCrumb($title, $this->getApplicationURI());
return $this->buildApplicationPage(
array(
$crumbs,
$view,
$pager,
),
array(
'title' => $title,
));
}
}