Skip to content
Snippets Groups Projects
Commit e032ed48 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #3507880: views_field_default_views_data is deprecated in D11.2.0

parent 86bd51f3
No related branches found
No related tags found
No related merge requests found
Pipeline #456083 passed with warnings
......@@ -13,7 +13,11 @@ use Drupal\field\FieldStorageConfigInterface;
* Implements hook_field_views_data().
*/
function languagefield_field_views_data(FieldStorageConfigInterface $field_storage): array {
$data = views_field_default_views_data($field_storage);
$data = (version_compare(\Drupal::VERSION, '11.2') >= 0)
? \Drupal::service('views.field_data_provider')
->defaultFieldImplementation($field_storage)
: views_field_default_views_data($field_storage);
foreach ($data as $table_name => $table_data) {
$data[$table_name][$field_storage->getName() . '_value']['filter']['id'] = 'languagefield';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment