Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F447842
AlmanacServiceListController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
AlmanacServiceListController.php
View Options
<?php
final
class
AlmanacServiceListController
extends
AlmanacServiceController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$controller
=
id
(
new
PhabricatorApplicationSearchController
())
->
setQueryKey
(
$request
->
getURIData
(
'queryKey'
))
->
setSearchEngine
(
new
AlmanacServiceSearchEngine
())
->
setNavigation
(
$this
->
buildSideNavView
());
return
$this
->
delegateToController
(
$controller
);
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$can_create
=
$this
->
hasApplicationCapability
(
AlmanacCreateServicesCapability
::
CAPABILITY
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Service'
))
->
setHref
(
$this
->
getApplicationURI
(
'service/edit/'
))
->
setIcon
(
'fa-plus-square'
)
->
setDisabled
(!
$can_create
)
->
setWorkflow
(!
$can_create
));
return
$crumbs
;
}
public
function
buildSideNavView
()
{
$viewer
=
$this
->
getViewer
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
id
(
new
AlmanacServiceSearchEngine
())
->
setViewer
(
$viewer
)
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
selectFilter
(
null
);
return
$nav
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 5:32 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
66673
Default Alt Text
AlmanacServiceListController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment