function views_test_data_views_form_substitutions

Same name in other branches
  1. 9 core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_form_substitutions()
  2. 8.9.x core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_form_substitutions()
  3. 11.x core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_form_substitutions()

Implements hook_views_form_substitutions().

File

core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc, line 22

Code

function views_test_data_views_form_substitutions() {
    \Drupal::state()->set('views_hook_test_views_form_substitutions', TRUE);
    $render = [
        '#markup' => '<em>unescaped</em>',
    ];
    return [
        '<!--will-be-escaped-->' => '<em>escaped</em>',
        '<!--will-be-not-escaped-->' => \Drupal::service('renderer')->renderInIsolation($render),
    ];
}

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