You are here

function template_preprocess_insert_button_widget in Insert 8

Same name and namespace in other branches
  1. 8.2 insert.module \template_preprocess_insert_button_widget()

Preprocess variables for the insert-button-widget.html.twig file.

File

./insert.module, line 190

Code

function template_preprocess_insert_button_widget(&$vars) {
  $element = $vars['element'];
  $vars['insert_absolute'] = $element['#insert_absolute'];
  $vars['insert_styles'] = $element['#options'];
  $vars['default_style'] = $element['#default_value'];
  $vars['widget_type'] = $element['#widget']['type'];
  $vars['insert_rotate'] = isset($element['#insert_rotate']) ? $element['#insert_rotate'] : FALSE;
  $vars['fid'] = $element['#fid'];
  $vars['nid'] = $element['#nid'];
}