W3cubDocs

/Drupal 8

function hook_views_form_substitutions

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

Hooks
Define functions that alter the behavior of Drupal core.

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!views.api.php/function/hook_views_form_substitutions/8.1.x