Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106039681
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
Fri, Mar 21, 18:49
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Mar 23, 18:49 (2 d)
Engine
blob
Format
Raw Data
Handle
25051754
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