function views_test_data_install

Same name and namespace in other branches
  1. 9 core/modules/views/tests/modules/views_test_data/views_test_data.install \views_test_data_install()
  2. 8.9.x core/modules/views/tests/modules/views_test_data/views_test_data.install \views_test_data_install()
  3. 10 core/modules/views/tests/modules/views_test_data/views_test_data.install \views_test_data_install()

Implements hook_install().

File

core/modules/views/tests/modules/views_test_data/views_test_data.install, line 20

Code

function views_test_data_install() : void {
  // Add the marquee tag to possible html elements to test the field handler.
  $values = [
    'div' => 'DIV',
    'span' => 'SPAN',
    'h1' => 'H1',
    'h2' => 'H2',
    'h3' => 'H3',
    'h4' => 'H4',
    'h5' => 'H5',
    'h6' => 'H6',
    'p' => 'P',
    'strong' => 'STRONG',
    'em' => 'EM',
    'marquee' => 'MARQUEE',
  ];
  \Drupal::configFactory()->getEditable('views.settings')
    ->set('field_rewrite_elements', $values)
    ->save();
}

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