drowl_paragraphs_bs-1.x-dev/modules/drowl_paragraphs_bs_type_simple_map/drowl_paragraphs_bs_type_simple_map.module
modules/drowl_paragraphs_bs_type_simple_map/drowl_paragraphs_bs_type_simple_map.module
<?php
/**
* @file
* Drowl_paragraphs_bs_type_simple_map module.
*/
/**
* Implements hook_preprocess_paragraph().
*/
function drowl_paragraphs_bs_type_simple_map_preprocess_paragraph(&$variables) {
$paragraph = $variables['paragraph'];
$paragraph_type = $paragraph->bundle();
// Load type specific libraries.
if ($paragraph_type === "simple_map") {
$variables['#attached']['library'][] = 'drowl_paragraphs_bs_type_simple_map/global';
}
}
/**
* Implements hook_theme().
*/
function drowl_paragraphs_bs_type_simple_map_theme($existing, $type, $theme, $path) {
$templates = $path . '/templates';
return [
'paragraph__drowl_paragraphs_bs__simple_map' => [
'base hook' => 'paragraph',
'path' => $templates,
],
];
}
