1 layout.theme.inc | theme_layout_settings_context_table($variables) |
Output the table for layout_settings_form() contexts.
File
- core/
modules/ layout/ layout.theme.inc, line 205 - Theme functions for the Layout module.
Code
function theme_layout_settings_context_table($variables) {
$element = $variables['element'];
$path = $element['#layout_path'];
$parts = explode('/', $path);
$header = array(
t('Context'),
t('Type'),
t('Operations'),
);
$rows = array();
foreach (element_children($element) as $key) {
$argument_parts = $parts;
$row = array();
$row[] = backdrop_render($element[$key]['summary']);
$row[] = backdrop_render($element[$key]['plugin']);
if (isset($element[$key]['operations'])) {
$row[] = backdrop_render($element[$key]['operations']);
}
else {
$row[] = array();
}
$rows[] = $row;
}
return theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array('id' => 'layout-context-table'),
'empty' => t('No contexts'),
));
}