function NodeTestViewsViewsHooks::viewsDataAlter

Implements hook_views_data_alter().

File

core/modules/node/tests/modules/node_test_views/src/Hook/NodeTestViewsViewsHooks.php, line 17

Class

NodeTestViewsViewsHooks
Hook implementations for node_test_views.

Namespace

Drupal\node_test_views\Hook

Code

public function viewsDataAlter(array &$data) : void {
    // Make node language use the basic field handler if requested.
    if (\Drupal::state()->get('node_test_views.use_basic_handler')) {
        $data['node_field_data']['langcode']['field']['id'] = 'language';
    }
}

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