Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F469645
DivinerParameterTableView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DivinerParameterTableView.php
View Options
<?php
final
class
DivinerParameterTableView
extends
AphrontTagView
{
private
$parameters
;
private
$header
;
public
function
setParameters
(
array
$parameters
)
{
$this
->
parameters
=
$parameters
;
return
$this
;
}
public
function
setHeader
(
$text
)
{
$this
->
header
=
$text
;
return
$this
;
}
public
function
getTagName
()
{
return
'div'
;
}
public
function
getTagAttributes
()
{
return
array
(
'class'
=>
'diviner-table-view'
,
);
}
public
function
getTagContent
()
{
require_celerity_resource
(
'diviner-shared-css'
);
$rows
=
array
();
foreach
(
$this
->
parameters
as
$param
)
{
$cells
=
array
();
$type
=
idx
(
$param
,
'doctype'
);
if
(!
$type
)
{
$type
=
idx
(
$param
,
'type'
);
}
$name
=
idx
(
$param
,
'name'
);
$docs
=
idx
(
$param
,
'docs'
);
$cells
[]
=
phutil_tag
(
'td'
,
array
(
'class'
=>
'diviner-parameter-table-type diviner-monospace'
,
),
$type
);
$cells
[]
=
phutil_tag
(
'td'
,
array
(
'class'
=>
'diviner-parameter-table-name diviner-monospace'
,
),
$name
);
$cells
[]
=
phutil_tag
(
'td'
,
array
(
'class'
=>
'diviner-parameter-table-docs'
,
),
$docs
);
$rows
[]
=
phutil_tag
(
'tr'
,
array
(),
$cells
);
}
$table
=
phutil_tag
(
'table'
,
array
(
'class'
=>
'diviner-parameter-table-view'
,
),
$rows
);
$header
=
phutil_tag
(
'span'
,
array
(
'class'
=>
'diviner-table-header'
,
),
$this
->
header
);
return
array
(
$header
,
$table
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 8:47 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
81489
Default Alt Text
DivinerParameterTableView.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment