You are here

function hook_views_form_substitutions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/views.api.php \hook_views_form_substitutions()

Replace special strings when processing a view with form elements.

Return value

array An associative array where each key is a string to be replaced, and the corresponding value is its replacement. The value will be escaped unless it is already marked safe.

Related topics

2 functions implement hook_views_form_substitutions()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

views_test_data_views_form_substitutions in core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc
Implements hook_views_form_substitutions().
views_views_form_substitutions in core/modules/views/views.views_execution.inc
Implements hook_views_form_substitutions().
1 invocation of hook_views_form_substitutions()
ViewsFormMainForm::preRenderViewsForm in core/modules/views/src/Form/ViewsFormMainForm.php
Replaces views substitution placeholders.

File

core/modules/views/views.api.php, line 684
Describes hooks and plugins provided by the Views module.

Code

function hook_views_form_substitutions() {
  return [
    '<!--views-form-example-substitutions-->' => 'Example Substitution',
  ];
}