Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98199314
AphrontFormHandlesControl.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
Fri, Jan 10, 23:42
Size
783 B
Mime Type
text/x-php
Expires
Sun, Jan 12, 23:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23532333
Attached To
rPH Phabricator
AphrontFormHandlesControl.php
View Options
<?php
final
class
AphrontFormHandlesControl
extends
AphrontFormControl
{
protected
function
getCustomControlClass
()
{
return
'aphront-form-control-handles'
;
}
protected
function
shouldRender
()
{
return
(
bool
)
$this
->
getValue
();
}
protected
function
renderInput
()
{
$value
=
$this
->
getValue
();
$viewer
=
$this
->
getUser
();
$list
=
$viewer
->
renderHandleList
(
$value
);
$list
=
id
(
new
PHUIBoxView
())
->
addPadding
(
PHUI
::
PADDING_SMALL_TOP
)
->
appendChild
(
$list
);
$inputs
=
array
();
foreach
(
$value
as
$phid
)
{
$inputs
[]
=
phutil_tag
(
'input'
,
array
(
'type'
=>
'hidden'
,
'name'
=>
$this
->
getName
().
'[]'
,
'value'
=>
$phid
,
));
}
return
array
(
$list
,
$inputs
);
}
}
Event Timeline
Log In to Comment