Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93654657
PhabricatorPackagesPublisherListView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 30, 11:43
Size
909 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 11:43 (2 d)
Engine
blob
Format
Raw Data
Handle
22647842
Attached To
rPH Phabricator
PhabricatorPackagesPublisherListView.php
View Options
<?php
final
class
PhabricatorPackagesPublisherListView
extends
PhabricatorPackagesView
{
private
$publishers
;
public
function
setPublishers
(
array
$publishers
)
{
assert_instances_of
(
$publishers
,
'PhabricatorPackagesPublisher'
);
$this
->
publishers
=
$publishers
;
return
$this
;
}
public
function
getPublishers
()
{
return
$this
->
publishers
;
}
public
function
render
()
{
return
$this
->
newListView
();
}
public
function
newListView
()
{
$viewer
=
$this
->
getViewer
();
$publishers
=
$this
->
getPublishers
();
$list
=
id
(
new
PHUIObjectItemListView
())
->
setViewer
(
$viewer
);
foreach
(
$publishers
as
$publisher
)
{
$item
=
id
(
new
PHUIObjectItemView
())
->
setObjectName
(
$publisher
->
getPublisherKey
())
->
setHeader
(
$publisher
->
getName
())
->
setHref
(
$publisher
->
getURI
());
$list
->
addItem
(
$item
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment