Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F36276618
PhabricatorCrumbsView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
PhabricatorCrumbsView.php
View Options
<?php
final
class
PhabricatorCrumbsView
extends
AphrontView
{
private
$crumbs
=
array
();
private
$actions
=
array
();
protected
function
canAppendChild
()
{
return
false
;
}
public
function
addCrumb
(
PhabricatorCrumbView
$crumb
)
{
$this
->
crumbs
[]
=
$crumb
;
return
$this
;
}
public
function
addAction
(
PhabricatorMenuItemView
$action
)
{
$this
->
actions
[]
=
$action
;
return
$this
;
}
public
function
render
()
{
require_celerity_resource
(
'phabricator-crumbs-view-css'
);
$action_view
=
null
;
if
(
$this
->
actions
)
{
$actions
=
array
();
foreach
(
$this
->
actions
as
$action
)
{
$icon
=
null
;
if
(
$action
->
getIcon
())
{
$icon
=
phutil_tag
(
'span'
,
array
(
'class'
=>
'sprite-icon action-'
.
$action
->
getIcon
(),
),
''
);
}
$actions
[]
=
javelin_tag
(
'a'
,
array
(
'href'
=>
$action
->
getHref
(),
'class'
=>
'phabricator-crumbs-action'
,
'sigil'
=>
$action
->
getWorkflow
()
?
'workflow'
:
null
,
),
array
(
$icon
,
$action
->
getName
(),
));
}
$action_view
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-crumbs-actions'
,
),
$this
->
renderSingleView
(
$actions
));
}
if
(
$this
->
crumbs
)
{
last
(
$this
->
crumbs
)->
setIsLastCrumb
(
true
);
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-crumbs-view '
.
'sprite-gradient gradient-breadcrumbs'
,
),
$this
->
renderSingleView
(
array
(
$action_view
,
$this
->
crumbs
,
)));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Feb 22, 6:47 PM (1 d, 5 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7f/b1/cde2282dff7923c522b3789a6e9e
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment