Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96197876
AphrontMoreView.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, Dec 23, 16:48
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 16:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23142859
Attached To
rPH Phabricator
AphrontMoreView.php
View Options
<?php
final
class
AphrontMoreView
extends
AphrontView
{
private
$some
;
private
$more
;
private
$expandtext
;
public
function
setSome
(
$some
)
{
$this
->
some
=
$some
;
return
$this
;
}
public
function
setMore
(
$more
)
{
$this
->
more
=
$more
;
return
$this
;
}
public
function
setExpandText
(
$text
)
{
$this
->
expandtext
=
$text
;
return
$this
;
}
public
function
render
()
{
$some
=
$this
->
some
;
$text
=
"(Show More
\x
E2
\x
80
\x
A6)"
;
if
(
$this
->
expandtext
!==
null
)
{
$text
=
$this
->
expandtext
;
}
$link
=
null
;
if
(
$this
->
more
&&
$this
->
more
!=
$this
->
some
)
{
Javelin
::
initBehavior
(
'aphront-more'
);
$link
=
' '
.
javelin_tag
(
'a'
,
array
(
'sigil'
=>
'aphront-more-view-show-more'
,
'mustcapture'
=>
true
,
'href'
=>
'#'
,
'meta'
=>
array
(
'more'
=>
$this
->
more
,
),
),
$text
);
}
return
javelin_render_tag
(
'div'
,
array
(
'sigil'
=>
'aphront-more-view'
,
),
$some
.
$link
);
}
}
Event Timeline
Log In to Comment