function views_field_default_views_data
Same name in this branch
- 11.x core/modules/views/views.views.inc \views_field_default_views_data()
Same name in other branches
- 9 core/modules/views/views.views.inc \views_field_default_views_data()
- 8.9.x core/modules/views/views.views.inc \views_field_default_views_data()
- 10 core/modules/views/views.views.inc \views_field_default_views_data()
Default views data implementation for a field.
Parameters
\Drupal\field\FieldStorageConfigInterface $field_storage: The field definition.
Return value
array The default views data for the field.
Deprecated
in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal::service('views.field_data_provider') ->defaultFieldImplementation($field_storage); instead.
See also
https://www.drupal.org/node/3489502
4 calls to views_field_default_views_data()
- datetime_type_field_views_data_helper in core/
modules/ datetime/ datetime.views.inc - Provides Views integration for any datetime-based fields.
- file_field_views_data in core/
modules/ file/ file.views.inc - Implements hook_field_views_data().
- image_field_views_data in core/
modules/ image/ image.views.inc - Implements hook_field_views_data().
- options_field_views_data in core/
modules/ options/ options.views.inc - Implements hook_field_views_data().
File
-
core/
modules/ views/ views.module, line 495
Code
function views_field_default_views_data(FieldStorageConfigInterface $field_storage) {
@trigger_error('views_field_default_views_data() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use \\Drupal::service(\'views.field_data_provider\')->defaultFieldImplementation($field_storage). See https://www.drupal.org/node/3489502', E_USER_DEPRECATED);
return \Drupal::service('views.field_data_provider')->defaultFieldImplementation($field_storage);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.