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

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

1 theme call to theme_trigger_display()
trigger_assign_form in modules/trigger/trigger.admin.inc
Create the form definition for assigning an action to a hook-op combination.

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;
}