function template_preprocess_filter_tips

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:
[
  'Full HTML' => [
    0 => [
      'tip' => 'Web page addresses and email addresses turn into links automatically.',
      'id' => 'filter/2',
    ],
  ],
];
  • long: (optional) Whether the passed-in filter tips contain extended explanations, i.e. intended to be output on the path 'filter/tips' (TRUE), or are in a short format, i.e. suitable to be displayed below a form element. Defaults to FALSE.

Deprecated

in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme().

See also

https://www.drupal.org/node/3504125

File

core/modules/filter/filter.module, line 356

Code

function template_preprocess_filter_tips(&$variables) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme(). See https://www.drupal.org/node/3504125', E_USER_DEPRECATED);
  \Drupal::service(FilterThemeHooks::class)->preprocessFilterTips($variables);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.