3 final class PhabricatorPackagesPackageListView
4 extends PhabricatorPackagesView
{
8 public function setPackages(array $packages) {
9 assert_instances_of($packages, 'PhabricatorPackagesPackage');
10 $this->packages
= $packages;
14 public function getPackages() {
15 return $this->packages
;
18 public function render() {
19 return $this->newListView();
22 public function newListView() {
23 $viewer = $this->getViewer();
24 $packages = $this->getPackages();
26 $list = id(new PHUIObjectItemListView())
29 foreach ($packages as $package) {
30 $item = id(new PHUIObjectItemView())
31 ->setObjectName($package->getFullKey())
32 ->setHeader($package->getName())
33 ->setHref($package->getURI());
35 $list->addItem($item);