You are here

function theme_notifications_ui_content_types in Notifications 6.4

Same name and namespace in other branches
  1. 6 notifications_ui/notifications_ui.pages.inc \theme_notifications_ui_content_types()
  2. 6.2 notifications_ui/notifications_ui.pages.inc \theme_notifications_ui_content_types()
  3. 6.3 notifications_ui/notifications_ui.pages.inc \theme_notifications_ui_content_types()

File

notifications_ui/notifications_ui.admin.inc, line 116
User pages for User Interface for subscriptions modules

Code

function theme_notifications_ui_content_types(&$elements) {
  $output = '';
  $options = _notifications_ui_node_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', $header, $rows);
  $output .= drupal_render($elements);
  return $output;
}