Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F74189703
PholioController.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, Jul 26, 09:26
Size
947 B
Mime Type
text/x-php
Expires
Sun, Jul 28, 09:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19351894
Attached To
rPH Phabricator
PholioController.php
View Options
<?php
/**
* @group pholio
*/
abstract
class
PholioController
extends
PhabricatorController
{
public
function
buildSideNavView
(
$for_app
=
false
)
{
$user
=
$this
->
getRequest
()->
getUser
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
id
(
new
PholioMockSearchEngine
())
->
setViewer
(
$user
)
->
addNavigationItems
(
$nav
->
getMenu
());
if
(
$for_app
)
{
$nav
->
addFilter
(
'new/'
,
pht
(
'Create Mock'
));
}
$nav
->
selectFilter
(
null
);
return
$nav
;
}
public
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Mock'
))
->
setHref
(
$this
->
getApplicationURI
(
'new/'
))
->
setIcon
(
'create'
));
return
$crumbs
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
true
)->
getMenu
();
}
}
Event Timeline
Log In to Comment