vbp_text_and_image.module in Varbase Bootstrap Paragraphs 9.0.x
Text and image sub-module file.
File
modules/vbp_text_and_image/vbp_text_and_image.moduleView source
<?php
/**
* @file
* Text and image sub-module file.
*/
/**
* Implements hook_theme().
*/
function vbp_text_and_image_theme($existing, $type, $theme, $path) {
return [
'paragraph__text_and_image' => [
'base hook' => 'paragraph',
],
];
}
/**
* Populates TWIG variables with VBP related data.
*
* E.g.: $variables['VBP']['test'] becomes
* {{ VBP.test }} in the templates.
*
* @param array &$variables
* The core $variables passed by reference.
* @param array $data
* New data in array format, which will be passed to the template.
*
* @return bool|array
* The new data.
*
* @internal
*/
function _varbase_bootstrap_paragraphs_text_and_image_add_template_variable(array &$variables, array $data = NULL) {
static $key = 'VBP';
if (!isset($variables[$key])) {
$variables[$key] = $data;
}
else {
$variables[$key][] = $data;
}
return $data;
}
Functions
Name | Description |
---|---|
vbp_text_and_image_theme | Implements hook_theme(). |
_varbase_bootstrap_paragraphs_text_and_image_add_template_variable | Populates TWIG variables with VBP related data. |