template_preprocess_responsive_image

template_preprocess_responsive_image(&$variables) Prepares variables for a responsive image. Default template: responsive-image.html.twig. Parameters $variables: An associative array containing: uri: The URI of the image. width: The width of the image (if known). height: The height of the image (if known). attributes: Associative array of attributes to be placed in the img tag. responsive_image_style_id: The ID of the responsive image style. File core/modules/responsive_image/respon

template_preprocess_region

template_preprocess_region(&$variables) Prepares variables for region templates. Default template: region.html.twig. Prepares the values passed to the theme_region function to be passed into a pluggable template engine. Uses the region name to generate a template file suggestions. Parameters array $variables: An associative array containing: elements: An associative array containing properties of the region. File core/includes/theme.inc, line 1509 The theme system, which controls the ou

template_preprocess_rdf_metadata

template_preprocess_rdf_metadata(&$variables) Prepares variables for RDF metadata templates. Default template: rdf-metadata.html.twig. Sometimes it is useful to export data which is not semantically present in the HTML output. For example, a hierarchy of comments is visible for a human but not for machines because this hierarchy is not present in the DOM tree. We can express it in RDFa via empty <span> tags. These aren't visible and give machines extra information about the content an

template_preprocess_radios

template_preprocess_radios(&$variables) Prepares variables for radios templates. Default template: radios.html.twig. Parameters array $variables: An associative array containing: element: An associative array containing the properties of the element. Properties used: #title, #value, #options, #description, #required, #attributes, #children. File core/includes/form.inc, line 274 Functions for form and batch generation and processing. Code function template_preprocess_radios(&$varia

template_preprocess_pager

template_preprocess_pager(&$variables) Prepares variables for pager templates. Default template: pager.html.twig. Menu callbacks that display paged query results should use #type => pager to retrieve a pager control so that users can view other results. Format a list of nearby pages with additional query results. Parameters array $variables: An associative array containing: pager: A render element containing: #tags: An array of labels for the controls in the pager. #element: An optio

template_preprocess_page

template_preprocess_page(&$variables) Prepares variables for the page template. Default template: page.html.twig. See the page.html.twig template for the list of variables. File core/includes/theme.inc, line 1346 The theme system, which controls the output of Drupal. Code function template_preprocess_page(&$variables) { $language_interface = \Drupal::languageManager()->getCurrentLanguage(); foreach (\Drupal::theme()->getActiveTheme()->getRegions() as $region) { if (!

template_preprocess_node_add_list

template_preprocess_node_add_list(&$variables) Prepares variables for list of available node type templates. Default template: node-add-list.html.twig. Parameters array $variables: An associative array containing: content: An array of content types. See also node_add_page() File core/modules/node/node.module, line 501 The core module that allows content to be submitted to the site. Code function template_preprocess_node_add_list(&$variables) { $variables['types'] = array(); i

template_preprocess_node

template_preprocess_node(&$variables) Prepares variables for node templates. Default template: node.html.twig. Most themes use their own copy of node.html.twig. The default is located inside "/core/modules/node/templates/node.html.twig". Look in there for the full list of variables. Parameters array $variables: An associative array containing: elements: An array of elements to display in view mode. node: The node object. view_mode: View mode; e.g., 'full', 'teaser', etc. File core/mod

template_preprocess_menu_local_task

template_preprocess_menu_local_task(&$variables) Prepares variables for single local task link templates. Default template: menu-local-task.html.twig. Parameters array $variables: An associative array containing: element: A render element containing: #link: A menu link array with 'title', 'url', and (optionally) 'localized_options' keys. #active: A boolean indicating whether the local task is active. Related topics Menu system Define the navigation menus, local actions and tasks, and

template_preprocess_menu_local_action

template_preprocess_menu_local_action(&$variables) Prepares variables for single local action link templates. Default template: menu-local-action.html.twig. Parameters array $variables: An associative array containing: element: A render element containing: #link: A menu link array with 'title', 'url', and (optionally) 'localized_options' keys. Related topics Menu system Define the navigation menus, local actions and tasks, and contextual links. File core/includes/menu.inc, line 65 A