Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93132723
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
Tue, Nov 26, 11:06
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 28, 11:06 (2 d)
Engine
blob
Format
Raw Data
Handle
22581529
Attached To
rPH Phabricator
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
(
PhabricatorMacroCapabilityManage
::
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
;
}
}
Event Timeline
Log In to Comment