galleryformatter.module in Gallery formatter 8
Same filename and directory in other branches
File
galleryformatter.moduleView source
<?php
/**
* Implementation of hook_theme().
*/
function galleryformatter_theme() {
return [
'galleryformatter' => [
'variables' => [
'slides' => NULL,
'thumbs' => NULL,
'settings' => NULL,
'dimensions' => NULL,
],
],
];
}
/**
* Prepares variables for galleryformatter templates.
*
* Default template: galleryformatter.html.twig.
*
* @param array $variables
* An associative array containing:
*/
function galleryformatter_preprocess_galleryformatter(&$variables) {
// @TODO Provide a unique hash for each slide
//foreach ($variables['slides'] as $key => $item) {
// $values = $item['#item']->getValue();
//}
$variables['#attached']['library'][] = 'galleryformatter/galleryformatter';
}
Functions
Name | Description |
---|---|
galleryformatter_preprocess_galleryformatter | Prepares variables for galleryformatter templates. |
galleryformatter_theme | Implementation of hook_theme(). |