reviews.module in Reviews 1.0.x
Same filename and directory in other branches
Contains reviews.module.
File
reviews.moduleView source
<?php
/**
* @file
* Contains reviews.module.
*/
use Drupal\Core\Render\Element;
function template_preprocess_review(&$variables) {
// Helpful $content variable for templates.
$variables['content'] = [];
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
}
}
/**
* Implements hook_theme().
*/
function reviews_theme($existing, $type, $theme, $path) {
return [
'review' => [
'render element' => 'elements',
],
'no_reviews' => [
'render element' => 'elements',
],
];
}
Functions
Name | Description |
---|---|
reviews_theme | Implements hook_theme(). |
template_preprocess_review |