3 final class PhabricatorPackagesVersionListView
4 extends PhabricatorPackagesView
{
8 public function setVersions(array $versions) {
9 assert_instances_of($versions, 'PhabricatorPackagesVersion');
10 $this->versions
= $versions;
14 public function getVersions() {
15 return $this->versions
;
18 public function render() {
19 return $this->newListView();
22 public function newListView() {
23 $viewer = $this->getViewer();
24 $versions = $this->getVersions();
26 $list = id(new PHUIObjectItemListView())
29 foreach ($versions as $version) {
30 $item = id(new PHUIObjectItemView())
31 ->setHeader($version->getName())
32 ->setHref($version->getURI());
34 $list->addItem($item);