function datetime_type_field_views_data_helper

Same name in this branch
  1. 11.x core/modules/datetime/datetime.views.inc \datetime_type_field_views_data_helper()
Same name and namespace in other branches
  1. 9 core/modules/datetime/datetime.views.inc \datetime_type_field_views_data_helper()
  2. 8.9.x core/modules/datetime/datetime.views.inc \datetime_type_field_views_data_helper()
  3. 10 core/modules/datetime/datetime.views.inc \datetime_type_field_views_data_helper()

Provides Views integration for any datetime-based fields.

Overrides the default Views data for datetime-based fields, adding datetime views plugins. Modules defining new datetime-based fields may use this function to simplify Views integration.

Parameters

\Drupal\field\FieldStorageConfigInterface $field_storage: The field storage config entity.

array $data: Field view data or FieldViewsDataProvider::defaultFieldImplementation($field_storage) if empty.

string $column_name: The schema column name with the datetime value.

Return value

array The array of field views data with the datetime plugin.

Deprecated

in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal::service('datetime.views_helper') ->buildViewsData($field_storage, $data, $column_name); instead.

See also

datetime_field_views_data()

datetime_range_field_views_data()

https://www.drupal.org/node/3489502

1 call to datetime_type_field_views_data_helper()
datetime_range_field_views_data in core/modules/datetime_range/datetime_range.views.inc
Implements hook_field_views_data().

File

core/modules/datetime/datetime.module, line 37

Code

function datetime_type_field_views_data_helper(FieldStorageConfigInterface $field_storage, array $data, $column_name) {
  @trigger_error('datetime_type_field_views_data_helper() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use \\Drupal::service(\'datetime.views_helper\')->buildViewsData($field_storage, $data, $column_name). See https://www.drupal.org/node/3489502', E_USER_DEPRECATED);
  return \Drupal::service('datetime.views_helper')->buildViewsData($field_storage, $data, $column_name);
}

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