function hook_views_form_substitutions
Same name and namespace in other branches
- 8.9.x core/modules/views/views.api.php \hook_views_form_substitutions()
- 10 core/modules/views/views.api.php \hook_views_form_substitutions()
- 11.x 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
4 functions implement hook_views_form_substitutions()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- ViewsTestDataViewsExecutionHooks::viewsFormSubstitutions in core/
modules/ views/ tests/ modules/ views_test_data/ src/ Hook/ ViewsTestDataViewsExecutionHooks.php - Implements hook_views_form_substitutions().
- ViewsViewsExecutionHooks::viewsFormSubstitutions in core/
modules/ views/ src/ Hook/ ViewsViewsExecutionHooks.php - Implements hook_views_form_substitutions().
- 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 678
Code
function hook_views_form_substitutions() {
return [
'<!--views-form-example-substitutions-->' => 'Example Substitution',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.