Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96119681
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
Sun, Dec 22, 20:23
Size
955 B
Mime Type
text/x-php
Expires
Tue, Dec 24, 20:23 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
23126448
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
(
'fa-plus-square'
));
return
$crumbs
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
true
)->
getMenu
();
}
}
Event Timeline
Log In to Comment