Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96133778
PhabricatorApplicationsListController.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 23, 00:06
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 00:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23129661
Attached To
rPH Phabricator
PhabricatorApplicationsListController.php
View Options
<?php
final
class
PhabricatorApplicationsListController
extends
PhabricatorApplicationsController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$nav
=
$this
->
buildSideNavView
();
$nav
->
selectFilter
(
'/'
);
$applications
=
PhabricatorApplication
::
getAllApplications
();
$list
=
$this
->
buildInstalledApplicationsList
(
$applications
);
$title
=
pht
(
'Installed Applications'
);
$header
=
id
(
new
PhabricatorHeaderView
())
->
setHeader
(
$title
);
$nav
->
appendChild
(
array
(
$header
,
$list
));
$crumbs
=
$this
->
buildApplicationCrumbs
()
->
addCrumb
(
id
(
new
PhabricatorCrumbView
())
->
setName
(
pht
(
'Applications'
))
->
setHref
(
$this
->
getApplicationURI
()));
$nav
->
setCrumbs
(
$crumbs
);
return
$this
->
buildApplicationPage
(
$nav
,
array
(
'title'
=>
$title
,
'device'
=>
true
,
)
);
}
private
function
buildInstalledApplicationsList
(
array
$applications
)
{
$list
=
new
PhabricatorObjectItemListView
();
$applications
=
msort
(
$applications
,
'getName'
);
foreach
(
$applications
as
$application
)
{
$item
=
id
(
new
PhabricatorObjectItemView
())
->
setHeader
(
$application
->
getName
())
->
setHref
(
'/applications/view/'
.
get_class
(
$application
).
'/'
)
->
addAttribute
(
$application
->
getShortDescription
());
if
(!
$application
->
isInstalled
())
{
$item
->
addIcon
(
'delete'
,
pht
(
'Uninstalled'
));
}
if
(
$application
->
isBeta
())
{
$item
->
addIcon
(
'lint-warning'
,
pht
(
'Beta'
));
}
$list
->
addItem
(
$item
);
}
return
$list
;
}
}
Event Timeline
Log In to Comment