Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93911378
PhabricatorPackagesVersionListView.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
Mon, Dec 2, 11:09
Size
822 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 11:09 (2 d)
Engine
blob
Format
Raw Data
Handle
22717879
Attached To
rPH Phabricator
PhabricatorPackagesVersionListView.php
View Options
<?php
final
class
PhabricatorPackagesVersionListView
extends
PhabricatorPackagesView
{
private
$versions
;
public
function
setVersions
(
array
$versions
)
{
assert_instances_of
(
$versions
,
'PhabricatorPackagesVersion'
);
$this
->
versions
=
$versions
;
return
$this
;
}
public
function
getVersions
()
{
return
$this
->
versions
;
}
public
function
render
()
{
return
$this
->
newListView
();
}
public
function
newListView
()
{
$viewer
=
$this
->
getViewer
();
$versions
=
$this
->
getVersions
();
$list
=
id
(
new
PHUIObjectItemListView
())
->
setViewer
(
$viewer
);
foreach
(
$versions
as
$version
)
{
$item
=
id
(
new
PHUIObjectItemView
())
->
setHeader
(
$version
->
getName
())
->
setHref
(
$version
->
getURI
());
$list
->
addItem
(
$item
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment