Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2359443
PhabricatorCrumbsView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
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
->
renderHTMLView
(
$actions
));
}
if
(
$this
->
crumbs
)
{
last
(
$this
->
crumbs
)->
setIsLastCrumb
(
true
);
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-crumbs-view '
.
'sprite-gradient gradient-breadcrumbs'
,
),
$this
->
renderHTMLView
(
array
(
$action_view
,
$this
->
crumbs
,
)));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 3:16 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
447880
Default Alt Text
PhabricatorCrumbsView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment