Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93522853
PhabricatorDashboardListController.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
Fri, Nov 29, 10:43
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 1, 10:43 (2 d)
Engine
blob
Format
Raw Data
Handle
22657627
Attached To
rPH Phabricator
PhabricatorDashboardListController.php
View Options
<?php
final
class
PhabricatorDashboardListController
extends
PhabricatorDashboardController
{
private
$queryKey
;
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
willProcessRequest
(
array
$data
)
{
$this
->
queryKey
=
idx
(
$data
,
'queryKey'
);
}
public
function
processRequest
()
{
$controller
=
id
(
new
PhabricatorApplicationSearchController
())
->
setQueryKey
(
$this
->
queryKey
)
->
setSearchEngine
(
new
PhabricatorDashboardSearchEngine
())
->
setNavigation
(
$this
->
buildSideNavView
());
return
$this
->
delegateToController
(
$controller
);
}
public
function
buildSideNavView
()
{
$user
=
$this
->
getRequest
()->
getUser
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
id
(
new
PhabricatorDashboardSearchEngine
())
->
setViewer
(
$user
)
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
addLabel
(
pht
(
'Panels'
));
$nav
->
addFilter
(
'panel/'
,
pht
(
'Manage Panels'
));
$nav
->
selectFilter
(
null
);
return
$nav
;
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setIcon
(
'fa-plus-square'
)
->
setName
(
pht
(
'Create Dashboard'
))
->
setHref
(
$this
->
getApplicationURI
().
'create/'
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment