protected function Debug::toInfoArrayMarkup in Openlayers 7.3
Return the markup for a table.
Parameters
array $data: The values of the table.
Return value
string The HTML.
1 call to Debug::toInfoArrayMarkup()
- Debug::getInfo in src/
Plugin/ Component/ Debug/ Debug.php - Array containing basic information about an OL Object.
File
- src/
Plugin/ Component/ Debug/ Debug.php, line 87 - Component: Debug.
Class
- Debug
- Class Debug.
Namespace
Drupal\openlayers\Plugin\Component\DebugCode
protected function toInfoArrayMarkup($data) {
$rows = array();
foreach ($data as $name => $value) {
if (is_array($value)) {
$value = $this
->toInfoArrayMarkup($value);
}
else {
$value = htmlspecialchars($value);
}
$rows[] = array(
'data' => array(
'<code>' . $name . '</code>',
'<code>' . $value . '</code>',
),
'no_striping' => TRUE,
);
}
$table = array(
'#type' => 'table',
'#rows' => $rows,
);
return drupal_render($table);
}