You are here

function theme_coder_review in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_review/coder_review.module \theme_coder_review()

Format coder_review form and results.

Parameters

$name: Name of module/theme checked, not used.

$filename: String filename checked.

$results: Array list of results HTML to display. See do_coder_reviews() for format.

2 theme calls to theme_coder_review()
_coder_review_form_output in coder_review/coder_review.module
_coder_review_page_form_includes in coder_review/coder_review.module
Add results to form array for display on form page.

File

coder_review/coder_review.module, line 2058

Code

function theme_coder_review($variables) {

  // theme the output for the Drupal shell
  if (function_exists('_coder_review_drush_is_option') && _coder_review_drush_is_option('drush')) {
    return theme_drush_coder_review($variables);
  }
  $name = $variables['name'];
  $filename = $variables['filename'];
  $results = $variables['results'];
  $output = '<div class="coder"><h2>' . basename($filename) . '</h2>';
  if (!empty($results)) {
    $output .= theme('item_list', array(
      'items' => $results,
    ));
  }
  $output .= '</div>';
  return $output;
}