Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93928725
PonderController.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 2, 14:12
Size
1008 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 14:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22726056
Attached To
rPH Phabricator
PonderController.php
View Options
<?php
abstract
class
PonderController
extends
PhabricatorController
{
protected
function
buildSideNavView
(
$for_app
=
false
)
{
$user
=
$this
->
getRequest
()->
getUser
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
if
(
$for_app
)
{
$nav
->
addFilter
(
'question/create/'
,
pht
(
'Ask Question'
));
}
id
(
new
PonderQuestionSearchEngine
())
->
setViewer
(
$user
)
->
addNavigationItems
(
$nav
->
getMenu
());
$nav
->
selectFilter
(
null
);
return
$nav
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
$for_app
=
true
)->
getMenu
();
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$href
=
$this
->
getApplicationURI
(
'question/create/'
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Ask Question'
))
->
setHref
(
$href
)
->
setIcon
(
'fa-plus-square'
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment