Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96363006
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
Wed, Dec 25, 22:42
Size
822 B
Mime Type
text/x-php
Expires
Fri, Dec 27, 22:42 (2 d)
Engine
blob
Format
Raw Data
Handle
23172033
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