function theme_monolog_channel_table in Monolog 7
Same name and namespace in other branches
- 6 monolog.admin.inc \theme_monolog_channel_table()
Returns HTML for the channel table.
Parameters
array $variables: An associative array containing:
- element: The FAPI element being themed.
1 theme call to theme_monolog_channel_table()
- monolog_channel_form in ./
monolog.admin.inc - Channel settings for the Monolog module.
File
- ./
monolog.admin.inc, line 130 - Administrative settings for the Monolog module.
Code
function theme_monolog_channel_table(array $variables) {
$output = '';
$header = array(
'channel' => t('Channel'),
'profile' => t('Logging Profile'),
);
$rows = array();
$channels = $variables['element']['channel_info']['#value'];
foreach ($channels as $channel_name => $channel_info) {
// @todo Theme function.
$label = check_plain($channel_info['label']);
$machine_name = '<small>' . t('(Machine name: @name)', array(
'@name' => $channel_name,
)) . '</small>';
$descripton = '<div class="description">' . filter_xss_admin($channel_info['description']) . '</div>';
$rows[] = array(
'channel' => $label . ' ' . $machine_name . $descripton,
'profile' => drupal_render($variables['element']['channels'][$channel_name]['profile']),
);
}
$output .= drupal_render_children($variables['element']);
$output .= theme('table', array(
'caption' => t('Logging Channels'),
'header' => $header,
'rows' => $rows,
'empty' => t('There are no available logging channels.'),
'attributes' => array(
'id' => 'monolog-channel-table',
),
));
return $output;
}