You are here

function theme_heartbeat_message_user_select_form in Heartbeat 7

Same name and namespace in other branches
  1. 6.4 heartbeat.module \theme_heartbeat_message_user_select_form()

Theme function for the user profile form.

Parameters

$variables: Array of variables available for output.

1 theme call to theme_heartbeat_message_user_select_form()
_theme_user_message_select_form in ./heartbeat.module
Helper theme function for the activity selection in the user profile form

File

./heartbeat.module, line 1407
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function theme_heartbeat_message_user_select_form($variables) {
  $form = $variables['form'];
  $rows = array();
  foreach (element_children($form) as $key) {
    $row = array();
    if (isset($form[$key]['title']) && is_array($form[$key]['title'])) {
      $row[] = drupal_render($form[$key]['title']);
      $row[] = drupal_render($form[$key]['access']);
    }
    $rows[] = $row;
  }
  $headers = array(
    t('Message types'),
    t('Operations'),
  );
  $output = theme('table', array(
    'headers' => $headers,
    'rows' => $rows,
  ));
  return $output;
}