template_preprocess_html

template_preprocess_html(&$variables) Prepares variables for HTML document templates. Default template: html.html.twig. Parameters array $variables: An associative array containing: page: A render element representing the page. File core/includes/theme.inc, line 1254 The theme system, which controls the output of Drupal. Code function template_preprocess_html(&$variables) { $variables['page'] = $variables['html']['page']; unset($variables['html']['page']); $variables['page_t

template_preprocess_image

template_preprocess_image(&$variables) Prepares variables for image templates. Default template: image.html.twig. Parameters array $variables: An associative array containing: uri: Either the path of the image file (relative to base_path()) or a full URL. width: The width of the image (if known). height: The height of the image (if known). alt: The alternative text for text-based browsers. HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft allows the alt attribute t

template_preprocess_forum_icon

template_preprocess_forum_icon(&$variables) Prepares variables for forum icon templates. Default template: forum-icon.html.twig. Parameters array $variables: An array containing the following elements: new_posts: Indicates whether or not the topic contains new posts. num_posts: The total number of posts in all topics. comment_mode: An integer indicating whether comments are open, closed, or hidden. sticky: Indicates whether the topic is sticky. first_new: Indicates whether this is the

template_preprocess_file_widget_multiple

template_preprocess_file_widget_multiple(&$variables) Prepares variables for multi file form widget templates. Default template: file-widget-multiple.html.twig. Parameters array $variables: An associative array containing: element: A render element representing the widgets. File core/modules/file/file.field.inc, line 21 Field module functionality for the File module. Code function template_preprocess_file_widget_multiple(&$variables) { $element = $variables['element']; // Spe

template_preprocess_filter_guidelines

template_preprocess_filter_guidelines(&$variables) Prepares variables for text format guideline templates. Default template: filter-guidelines.html.twig. Parameters array $variables: An associative array containing: format: An object representing a text format. File core/modules/filter/filter.module, line 373 Framework for handling the filtering of content. Code function template_preprocess_filter_guidelines(&$variables) { $format = $variables['format']; $variables['tips'] = a

template_preprocess_filter_tips

template_preprocess_filter_tips(&$variables) Prepares variables for filter tips templates. Default template: filter-tips.html.twig. Parameters array $variables: An associative array containing: tips: An array containing descriptions and a CSS ID in the form of 'module-name/filter-id' (only used when $long is TRUE) for each filter in one or more text formats. Example: array( 'Full HTML' => array( 0 => array( 'tip' => 'Web page addresses and e

template_preprocess_file_managed_file

template_preprocess_file_managed_file(&$variables) Prepares variables for file form widget templates. Default template: file-managed-file.html.twig. Parameters array $variables: An associative array containing: element: A render element representing the file. File core/modules/file/file.module, line 1220 Defines a "managed_file" Form API field and a "file" field for Field module. Code function template_preprocess_file_managed_file(&$variables) { $element = $variables['element'];

template_preprocess_file_upload_help

template_preprocess_file_upload_help(&$variables) Prepares variables for file upload help text templates. Default template: file-upload-help.html.twig. Parameters array $variables: An associative array containing: description: The normal description for this field, specified by the user. upload_validators: An array of upload validators as used in $element['#upload_validators']. File core/modules/file/file.field.inc, line 142 Field module functionality for the File module. Code functi

template_preprocess_form_element

template_preprocess_form_element(&$variables) Returns HTML for a form element. Prepares variables for form element templates. Default template: form-element.html.twig. In addition to the element itself, the DIV contains a label for the element based on the optional #title_display property, and an optional #description. The optional #title_display property can have these values: before: The label is output before the element. This is the default. The label includes the #title and the requir

template_preprocess_form

template_preprocess_form(&$variables) Prepares variables for form templates. Default template: form.html.twig. Parameters $variables: An associative array containing: element: An associative array containing the properties of the element. Properties used: #action, #method, #attributes, #children File core/includes/form.inc, line 352 Functions for form and batch generation and processing. Code function template_preprocess_form(&$variables) { $element = $variables['element']; if