You are here

function nodejs_watchdog_theme_row in Node.js integration 7

Theme a watchdog row.

1 call to nodejs_watchdog_theme_row()
nodejs_watchdog_watchdog in nodejs_watchdog/nodejs_watchdog.module
Implements hook_watchdog().

File

nodejs_watchdog/nodejs_watchdog.module, line 71

Code

function nodejs_watchdog_theme_row($row) {
  $attributes = array();
  $flip = array(
    'even' => 'odd',
    'odd' => 'even',
  );
  $class = 'even';
  $output = "";

  // Check if we're dealing with a simple or complex row
  if (isset($row['data'])) {
    foreach ($row as $key => $value) {
      if ($key == 'data') {
        $cells = $value;
      }
      else {
        $attributes[$key] = $value;
      }
    }
  }
  else {
    $cells = $row;
  }
  if (count($cells)) {
    $output .= '<tr' . drupal_attributes($attributes) . '>';
    $i = 0;
    foreach ($cells as $cell) {
      $output .= _theme_table_cell($cell);
    }
    $output .= "</tr>";
  }
  return $output;
}