Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109618401
PhabricatorHeaderView.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, Apr 22, 17:42
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 24, 17:42 (7 h, 20 m)
Engine
blob
Format
Raw Data
Handle
25740964
Attached To
rPH Phabricator
PhabricatorHeaderView.php
View Options
<?php
final
class
PhabricatorHeaderView
extends
AphrontView
{
private
$objectName
;
private
$header
;
private
$tags
=
array
();
public
function
setHeader
(
$header
)
{
$this
->
header
=
$header
;
return
$this
;
}
public
function
setObjectName
(
$object_name
)
{
$this
->
objectName
=
$object_name
;
return
$this
;
}
public
function
addTag
(
PhabricatorTagView
$tag
)
{
$this
->
tags
[]
=
$tag
;
return
$this
;
}
public
function
render
()
{
require_celerity_resource
(
'phabricator-header-view-css'
);
$header
=
array
(
$this
->
header
);
if
(
$this
->
objectName
)
{
array_unshift
(
$header
,
phutil_tag
(
'a'
,
array
(
'href'
=>
'/'
.
$this
->
objectName
,
),
$this
->
objectName
),
' '
);
}
if
(
$this
->
tags
)
{
$header
[]
=
phutil_tag
(
'span'
,
array
(
'class'
=>
'phabricator-header-tags'
,
),
$this
->
renderHTMLView
(
$this
->
tags
));
}
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'phabricator-header-shell'
,
),
phutil_tag
(
'h1'
,
array
(
'class'
=>
'phabricator-header-view'
,
),
$header
));
}
}
Event Timeline
Log In to Comment