Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98187425
FundInitiativeListController.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, Jan 10, 20:29
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 12, 20:29 (2 d)
Engine
blob
Format
Raw Data
Handle
23517507
Attached To
rPH Phabricator
FundInitiativeListController.php
View Options
<?php
final
class
FundInitiativeListController
extends
FundController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$querykey
=
$request
->
getURIData
(
'queryKey'
);
$controller
=
id
(
new
PhabricatorApplicationSearchController
())
->
setQueryKey
(
$querykey
)
->
setSearchEngine
(
new
FundInitiativeSearchEngine
())
->
setNavigation
(
$this
->
buildSideNavView
());
return
$this
->
delegateToController
(
$controller
);
}
public
function
buildSideNavView
()
{
$viewer
=
$this
->
getViewer
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
id
(
new
FundInitiativeSearchEngine
())
->
setViewer
(
$viewer
)
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
addLabel
(
pht
(
'Backers'
));
$nav
->
addFilter
(
'backers/'
,
pht
(
'Find Backers'
));
$nav
->
selectFilter
(
null
);
return
$nav
;
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$can_create
=
$this
->
hasApplicationCapability
(
FundCreateInitiativesCapability
::
CAPABILITY
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Initiative'
))
->
setHref
(
$this
->
getApplicationURI
(
'create/'
))
->
setIcon
(
'fa-plus-square'
)
->
setDisabled
(!
$can_create
)
->
setWorkflow
(!
$can_create
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment