theme_trigger_display

Versions
6
theme_trigger_display($element)
7
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

Code

modules/trigger/trigger.admin.inc, line 233

<?php
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(
        $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
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.