You are here

function reviews_theme in Reviews 7

Same name and namespace in other branches
  1. 1.0.x reviews.module \reviews_theme()

Implements hook_theme().

File

./reviews.module, line 142
This file defines all the necessary hooks and functions to create a system for enabling and authoring content reviews on a per content type basis.

Code

function reviews_theme($existing, $type, $theme, $path) {
  if ($type == 'module') {
    return array(
      'reviews_no_reviews' => array(
        'render_element' => 'element',
        'variables' => array(
          'nid' => NULL,
        ),
        'template' => 'reviews-no-reviews',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
      'reviews' => array(
        'render_element' => 'element',
        'variables' => array(
          'nid' => NULL,
          'review_count' => NULL,
          'pending_count' => NULL,
          'reviews' => array(),
          'pager' => NULL,
        ),
        'template' => 'reviews',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
      'block_reviews' => array(
        'render_element' => 'element',
        'variables' => array(
          'nid' => NULL,
          'reviews' => array(),
        ),
        'template' => 'block-reviews',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
      'block_my_reviews' => array(
        'render_element' => 'element',
        'variables' => array(
          'reviews' => array(),
        ),
        'template' => 'block-my-reviews',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
      'review' => array(
        'render_element' => 'element',
        'variables' => array(
          'nid' => NULL,
          'index' => NULL,
          'total_reviews' => NULL,
          'review' => array(),
        ),
        'template' => 'review',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
      'block_review' => array(
        'render_element' => 'element',
        'variables' => array(
          'nid' => NULL,
          'index' => NULL,
          'total_reviews' => NULL,
          'review' => array(),
        ),
        'template' => 'block-review',
        'path' => drupal_get_path('module', 'reviews') . '/theme',
      ),
    );
  }
  return array();
}