Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93461235
PHUIDiffInlineCommentRowScaffold.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
Thu, Nov 28, 23:04
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 30, 23:04 (2 d)
Engine
blob
Format
Raw Data
Handle
22644651
Attached To
rPH Phabricator
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
;
}
}
Event Timeline
Log In to Comment