Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F113181705
PhabricatorMacroController.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
Thu, May 15, 21:48
Size
1 KB
Mime Type
text/x-php
Expires
Sat, May 17, 21:48 (2 d)
Engine
blob
Format
Raw Data
Handle
26196403
Attached To
rPH Phabricator
PhabricatorMacroController.php
View Options
<?php
abstract
class
PhabricatorMacroController
extends
PhabricatorController
{
protected
function
buildSideNavView
(
$for_app
=
false
,
$has_search
=
false
)
{
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
if
(
$for_app
)
{
$nav
->
addLabel
(
'Create'
);
$nav
->
addFilter
(
''
,
'Create Macro'
,
$this
->
getApplicationURI
(
'/create/'
));
}
$nav
->
addLabel
(
'Macros'
);
$nav
->
addFilter
(
'/'
,
'All Macros'
);
if
(
$has_search
)
{
$nav
->
addFilter
(
'search'
,
'Search'
,
$this
->
getRequest
()->
getRequestURI
());
}
return
$nav
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
$for_app
=
true
)->
getMenu
();
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$crumbs
->
addAction
(
id
(
new
PhabricatorMenuItemView
())
->
setName
(
pht
(
'Create Macro'
))
->
setHref
(
$this
->
getApplicationURI
(
'/create/'
))
->
setIcon
(
'create'
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment