You are here

function theme_notifications_content_type_settings in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_content/notifications_content.pages.inc \theme_notifications_content_type_settings()
  2. 6 notifications_content/notifications_content.pages.inc \theme_notifications_content_type_settings()
  3. 6.2 notifications_content/notifications_content.pages.inc \theme_notifications_content_type_settings()
  4. 6.3 notifications_content/notifications_content.pages.inc \theme_notifications_content_type_settings()

Theme content type settings

File

notifications_content/notifications_content.admin.inc, line 216
Subscriptions to content events

Code

function theme_notifications_content_type_settings(&$elements) {
  $output = '';
  $options = _notifications_content_type_options();
  $header = array_merge(array(
    '',
  ), array_values($options));
  $rows = array();
  foreach (element_children($elements) as $key) {
    $row = array(
      $elements[$key]['#title'],
    );
    unset($elements[$key]['#title']);
    foreach (array_keys($options) as $index) {
      unset($elements[$key][$index]['#title']);
      $row[] = drupal_render($elements[$key][$index]);
    }
    $rows[] = $row;
  }
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render($elements);
  return $output;
}