Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98439891
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, Jan 13, 05:22
Size
870 B
Mime Type
text/x-php
Expires
Wed, Jan 15, 05:22 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23584783
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