Consider to document/remove {$field_module}_field_views_data_views_data_alter()"

Created on 17 November 2012, over 12 years ago
Updated 22 July 2023, almost 2 years ago

As written on #1834184-7: Add basic views hooks to hook_hook_info β†’ the amount of different hooks views provides for fields-views integration is quite confusing:

  • $fieldmodule_field_views_data : If a field module want to provide custom views integration, that hook is called. Most of the time
    you want to just add another element, so it's enough to call the helper function field_views_field_default_views_data(). This function
    should use to the field plugin.
  • $fieldmodule_field_views_data_views_data_alter : If a field module wants to alter views data on a per field base, this hook should be used. This hook should be probably moved to the field plugin.
  • hook_field_views_data_alter : Alter the viewsdata per field, so you have a handy alter method that give you context of the field.

The proposal is basically to move the first two functions and keep the alter hook, and document it.

πŸ“Œ Task
Status

Closed: duplicate

Version

9.5

Component
ViewsΒ  β†’

Last updated about 17 hours ago

Created by

πŸ‡©πŸ‡ͺGermany dawehner

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024