Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / packages / view / PhabricatorPackagesPublisherListView.php
blobfe7b2b37e4deec6b5a477cd075eaaba5bb023040
1 <?php
3 final class PhabricatorPackagesPublisherListView
4 extends PhabricatorPackagesView {
6 private $publishers;
8 public function setPublishers(array $publishers) {
9 assert_instances_of($publishers, 'PhabricatorPackagesPublisher');
10 $this->publishers = $publishers;
11 return $this;
14 public function getPublishers() {
15 return $this->publishers;
18 public function render() {
19 return $this->newListView();
22 public function newListView() {
23 $viewer = $this->getViewer();
24 $publishers = $this->getPublishers();
26 $list = id(new PHUIObjectItemListView())
27 ->setViewer($viewer);
29 foreach ($publishers as $publisher) {
30 $item = id(new PHUIObjectItemView())
31 ->setObjectName($publisher->getPublisherKey())
32 ->setHeader($publisher->getName())
33 ->setHref($publisher->getURI());
35 $list->addItem($item);
38 return $list;