Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F72142077
PhabricatorHTTPParameterTypeTableView.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
Sun, Jul 14, 23:01
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jul 16, 23:01 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19038400
Attached To
rPH Phabricator
PhabricatorHTTPParameterTypeTableView.php
View Options
<?php
final
class
PhabricatorHTTPParameterTypeTableView
extends
AphrontView
{
private
$types
;
public
function
setHTTPParameterTypes
(
array
$types
)
{
assert_instances_of
(
$types
,
'AphrontHTTPParameterType'
);
$this
->
types
=
$types
;
return
$this
;
}
public
function
getHTTPParameterTypes
()
{
return
$this
->
types
;
}
public
function
render
()
{
$types
=
$this
->
getHTTPParameterTypes
();
$types
=
mpull
(
$types
,
null
,
'getTypeName'
);
$br
=
phutil_tag
(
'br'
);
$rows
=
array
();
foreach
(
$types
as
$name
=>
$type
)
{
$formats
=
$type
->
getFormatDescriptions
();
$formats
=
phutil_implode_html
(
$br
,
$formats
);
$examples
=
$type
->
getExamples
();
$examples
=
phutil_implode_html
(
$br
,
$examples
);
$rows
[]
=
array
(
$name
,
$formats
,
$examples
,
);
}
$table
=
id
(
new
AphrontTableView
(
$rows
))
->
setHeaders
(
array
(
pht
(
'Type'
),
pht
(
'Formats'
),
pht
(
'Examples'
),
))
->
setColumnClasses
(
array
(
'pri top'
,
'top'
,
'wide top prewrap'
,
));
return
$table
;
}
}
Event Timeline
Log In to Comment