Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93907028
PhabricatorPackagesPackageListView.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, 10:22
Size
870 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 10:22 (2 d)
Engine
blob
Format
Raw Data
Handle
22717892
Attached To
rPH Phabricator
PhabricatorPackagesPackageListView.php
View Options
<?php
final
class
PhabricatorPackagesPackageListView
extends
PhabricatorPackagesView
{
private
$packages
;
public
function
setPackages
(
array
$packages
)
{
assert_instances_of
(
$packages
,
'PhabricatorPackagesPackage'
);
$this
->
packages
=
$packages
;
return
$this
;
}
public
function
getPackages
()
{
return
$this
->
packages
;
}
public
function
render
()
{
return
$this
->
newListView
();
}
public
function
newListView
()
{
$viewer
=
$this
->
getViewer
();
$packages
=
$this
->
getPackages
();
$list
=
id
(
new
PHUIObjectItemListView
())
->
setViewer
(
$viewer
);
foreach
(
$packages
as
$package
)
{
$item
=
id
(
new
PHUIObjectItemView
())
->
setObjectName
(
$package
->
getFullKey
())
->
setHeader
(
$package
->
getName
())
->
setHref
(
$package
->
getURI
());
$list
->
addItem
(
$item
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment