Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F32914368
AphrontListFilterView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
2 KB
Subscribers
None
AphrontListFilterView.php
View Options
<?php
final
class
AphrontListFilterView
extends
AphrontView
{
private
$showAction
;
private
$hideAction
;
private
$showHideDescription
;
private
$showHideHref
;
public
function
setCollapsed
(
$show
,
$hide
,
$description
,
$href
)
{
$this
->
showAction
=
$show
;
$this
->
hideAction
=
$hide
;
$this
->
showHideDescription
=
$description
;
$this
->
showHideHref
=
$href
;
return
$this
;
}
public
function
render
()
{
$content
=
$this
->
renderChildren
();
if
(!
$content
)
{
return
null
;
}
require_celerity_resource
(
'aphront-list-filter-view-css'
);
$content
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'aphront-list-filter-view-content'
,
),
$content
);
$classes
=
array
();
$classes
[]
=
'aphront-list-filter-view'
;
if
(
$this
->
showAction
!==
null
)
{
$classes
[]
=
'aphront-list-filter-view-collapsible'
;
Javelin
::
initBehavior
(
'phabricator-reveal-content'
);
$hide_action_id
=
celerity_generate_unique_node_id
();
$show_action_id
=
celerity_generate_unique_node_id
();
$content_id
=
celerity_generate_unique_node_id
();
$hide_action
=
javelin_tag
(
'a'
,
array
(
'class'
=>
'button grey'
,
'sigil'
=>
'reveal-content'
,
'id'
=>
$hide_action_id
,
'href'
=>
$this
->
showHideHref
,
'meta'
=>
array
(
'hideIDs'
=>
array
(
$hide_action_id
),
'showIDs'
=>
array
(
$content_id
,
$show_action_id
),
),
),
$this
->
showAction
);
$content_description
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'aphront-list-filter-description'
,
),
$this
->
showHideDescription
);
$show_action
=
javelin_tag
(
'a'
,
array
(
'class'
=>
'button grey'
,
'sigil'
=>
'reveal-content'
,
'style'
=>
'display: none;'
,
'href'
=>
'#'
,
'id'
=>
$show_action_id
,
'meta'
=>
array
(
'hideIDs'
=>
array
(
$content_id
,
$show_action_id
),
'showIDs'
=>
array
(
$hide_action_id
),
),
),
$this
->
hideAction
);
$reveal_block
=
phutil_tag
(
'div'
,
array
(
'class'
=>
'aphront-list-filter-reveal'
,
),
array
(
$content_description
,
$hide_action
,
$show_action
,
));
$content
=
array
(
$reveal_block
,
phutil_tag
(
'div'
,
array
(
'id'
=>
$content_id
,
'style'
=>
'display: none;'
,
),
$content
),
);
}
$content
=
phutil_tag
(
'div'
,
array
(
'class'
=>
implode
(
' '
,
$classes
),
),
$content
);
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'aphront-list-filter-wrap'
,
),
$content
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 17, 9:29 PM (59 m, 3 s)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3a/4d/fb9ca64254653cb799c7eba5b9df
Attached To
rPHAB Phabricator
Event Timeline
Log In to Comment