Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102070818
PhabricatorProjectListController.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
Sun, Feb 16, 19:45
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Feb 18, 19:45 (2 d)
Engine
blob
Format
Raw Data
Handle
24275175
Attached To
rPH Phabricator
PhabricatorProjectListController.php
View Options
<?php
final
class
PhabricatorProjectListController
extends
PhabricatorProjectController
{
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
PhabricatorProjectSearchEngine
())
->
setNavigation
(
$this
->
buildSideNavView
());
return
$this
->
delegateToController
(
$controller
);
}
public
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$can_create
=
$this
->
hasApplicationCapability
(
ProjectCreateProjectsCapability
::
CAPABILITY
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Project'
))
->
setHref
(
$this
->
getApplicationURI
(
'create/'
))
->
setIcon
(
'fa-plus-square'
)
->
setWorkflow
(!
$can_create
)
->
setDisabled
(!
$can_create
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment