function bear_paragraph_text_and_image_preprocess_paragraph__text_and_image in Bear 8.2
Same name and namespace in other branches
- 8 modules/custom/bear_paragraph_text_and_image/bear_paragraph_text_and_image.module \bear_paragraph_text_and_image_preprocess_paragraph__text_and_image()
Implements hook_preprocess_HOOK().
File
- modules/
custom/ bear_paragraph_text_and_image/ bear_paragraph_text_and_image.module, line 22 - Customizations related to the Text and Image paragraph bundle.
Code
function bear_paragraph_text_and_image_preprocess_paragraph__text_and_image(&$variables) {
$fields = $variables['paragraph']
->getFields();
$image_position = $fields['field_text_and_image__position']
->getValue();
$image_position = $image_position[0]['value'];
$variables['image_position'] = $image_position;
}