Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104724272
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
Tue, Mar 11, 20:45
Size
928 B
Mime Type
text/x-php
Expires
Thu, Mar 13, 20:45 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24836875
Attached To
rPH Phabricator
PholioController.php
View Options
<?php
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