Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35860179
PhabricatorMacroController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorMacroController.php
View Options
<?php
abstract
class
PhabricatorMacroController
extends
PhabricatorController
{
protected
function
buildSideNavView
(
$for_app
=
false
)
{
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
if
(
$for_app
)
{
$nav
->
addLabel
(
pht
(
'Create'
));
$nav
->
addFilter
(
''
,
pht
(
'Create Macro'
),
$this
->
getApplicationURI
(
'/create/'
));
}
id
(
new
PhabricatorMacroSearchEngine
())
->
setViewer
(
$this
->
getRequest
()->
getUser
())
->
addNavigationItems
(
$nav
->
getMenu
());
return
$nav
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNavView
(
$for_app
=
true
)->
getMenu
();
}
protected
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$can_manage
=
$this
->
hasApplicationCapability
(
PhabricatorMacroManageCapability
::
CAPABILITY
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Macro'
))
->
setHref
(
$this
->
getApplicationURI
(
'/create/'
))
->
setIcon
(
'fa-plus-square'
)
->
setDisabled
(!
$can_manage
)
->
setWorkflow
(!
$can_manage
));
return
$crumbs
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 15, 3:46 PM (5 h, 3 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cb/e3/bf3479698850fdadc3337d6a26d5
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment