Same name and namespace in other branches
  1. 6.x modules/trigger/trigger.admin.inc \theme_trigger_display()

Returns HTML for the form showing actions assigned to a trigger.

Parameters

$variables: An associative array containing:

  • element: The fieldset including all assigned actions.

Related topics

1 theme call to theme_trigger_display()
trigger_assign_form in modules/trigger/trigger.admin.inc
Returns the form for assigning an action to a trigger.

File

modules/trigger/trigger.admin.inc, line 296
Admin page callbacks for the trigger module.

Code

function theme_trigger_display($variables) {
  $element = $variables['element'];
  $header = array();
  $rows = array();
  if (isset($element['assigned']) && 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(
        check_plain($info['label']),
        $info['link'],
      );
    }
  }
  if (count($rows)) {
    $output = theme('table', array(
      'header' => $header,
      'rows' => $rows,
    )) . drupal_render_children($element);
  }
  else {
    $output = drupal_render_children($element);
  }
  return $output;
}