Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73573355
PHUIStatusItemView.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
Mon, Jul 22, 19:48
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Jul 24, 19:48 (2 d)
Engine
blob
Format
Raw Data
Handle
19214617
Attached To
rPH Phabricator
PHUIStatusItemView.php
View Options
<?php
final
class
PHUIStatusItemView
extends
AphrontTagView
{
private
$icon
;
private
$iconLabel
;
private
$target
;
private
$note
;
private
$highlighted
;
public
function
setIcon
(
$icon
,
$label
=
null
)
{
$this
->
icon
=
$icon
;
$this
->
iconLabel
=
$label
;
return
$this
;
}
public
function
setTarget
(
$target
)
{
$this
->
target
=
$target
;
return
$this
;
}
public
function
setNote
(
$note
)
{
$this
->
note
=
$note
;
return
$this
;
}
public
function
setHighlighted
(
$highlighted
)
{
$this
->
highlighted
=
$highlighted
;
return
$this
;
}
protected
function
canAppendChild
()
{
return
false
;
}
protected
function
getTagName
()
{
return
'tr'
;
}
protected
function
getTagAttributes
()
{
$classes
=
array
();
if
(
$this
->
highlighted
)
{
$classes
[]
=
'phui-status-item-highlighted'
;
}
return
array
(
'class'
=>
$classes
,
);
}
protected
function
getTagContent
()
{
$icon
=
null
;
if
(
$this
->
icon
)
{
$icon
=
id
(
new
PHUIIconView
())
->
setSpriteSheet
(
PHUIIconView
::
SPRITE_STATUS
)
->
setSpriteIcon
(
$this
->
icon
);
if
(
$this
->
iconLabel
)
{
Javelin
::
initBehavior
(
'phabricator-tooltips'
);
$icon
->
addSigil
(
'has-tooltip'
);
$icon
->
setMetadata
(
array
(
'tip'
=>
$this
->
iconLabel
,
'size'
=>
240
,
));
}
}
$icon_cell
=
phutil_tag
(
'td'
,
array
(),
$icon
);
$target_cell
=
phutil_tag
(
'td'
,
array
(
'class'
=>
'phui-status-item-target'
,
),
$this
->
target
);
$note_cell
=
phutil_tag
(
'td'
,
array
(
'class'
=>
'phui-status-item-note'
,
),
$this
->
note
);
return
array
(
$icon_cell
,
$target_cell
,
$note_cell
,
);
}
}
Event Timeline
Log In to Comment