| 6 trigger.admin.inc | theme_trigger_display( |
| 7 trigger.admin.inc | theme_trigger_display($variables) |
Display actions assigned to this hook-op combination in a table.
Parameters
array $element: The fieldset including all assigned actions.
Return value
The rendered form with the table prepended.
Related topics
File
- modules/
trigger/ trigger.admin.inc, line 233 - Admin page callbacks for the trigger module.
Code
function theme_trigger_display($element) {
$header = array();
$rows = array();
if (count($element['assigned']['#value'])) {
$header = array(array('data' => t('Name')), array('data' => t('Operation')));
$rows = array();
foreach ($element['assigned']['#value'] as $aid => $info) {
$rows[] = array(
filter_xss_admin($info['description']),
$info['link'],
);
}
}
if (count($rows)) {
$output = theme('table', $header, $rows) . drupal_render($element);
}
else {
$output = drupal_render($element);
}
return $output;
}
Login or register to post comments