Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F424423
PHUIDiffInlineCommentRowScaffold.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
PHUIDiffInlineCommentRowScaffold.php
View Options
<?php
/**
* Wraps an inline comment in a table row.
*
* Inline comments need different wrapping cells when shown in unified vs
* side-by-side diffs, as the two tables have different layouts. This wraps
* an inline comment element in an appropriate table row.
*/
abstract
class
PHUIDiffInlineCommentRowScaffold
extends
AphrontView
{
private
$views
=
array
();
public
function
getInlineViews
()
{
return
$this
->
views
;
}
public
function
addInlineView
(
PHUIDiffInlineCommentView
$view
)
{
$this
->
views
[]
=
$view
;
return
$this
;
}
protected
function
getRowAttributes
()
{
$is_hidden
=
false
;
foreach
(
$this
->
getInlineViews
()
as
$view
)
{
if
(
$view
->
isHidden
())
{
$is_hidden
=
true
;
}
}
$classes
=
array
();
$classes
[]
=
'inline'
;
if
(
$is_hidden
)
{
$classes
[]
=
'inline-hidden'
;
}
$result
=
array
(
'class'
=>
implode
(
' '
,
$classes
),
'sigil'
=>
'inline-row'
,
'meta'
=>
array
(
'hidden'
=>
$is_hidden
,
),
);
return
$result
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, May 2, 9:17 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
57318
Default Alt Text
PHUIDiffInlineCommentRowScaffold.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment