Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92735695
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
Sat, Nov 23, 06:48
Size
822 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 06:48 (2 d)
Engine
blob
Format
Raw Data
Handle
22501514
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