extend the _field_invoke() / _field_invoke_default() patterns ?

Created on 11 February 2009, over 15 years ago
Updated 22 June 2023, about 1 year ago

Spinoff from http://drupal.org/node/367595#comment-1252330
_field_invoke() / _field_invoke_default() are quite powerful tools, used throughout all of field_attach operations for common tasks like 'run "something" on all the fields of an $object'. Something like a field iterator.

Currently, though, the "something" can only be:
- an operation defined by the field type (_field_invoke(), calls the field type's hook_field_*())
- a 'default', cross field-type operation defined by field.module (_field_invoke_default(), calls field_default_*())

I'm thinking it might be useful to let other modules say 'run *this* function on all the fields of an $object'.

Use case taken from http://drupal.org/node/367595#comment-1251517 (translatable fields) - extract values of the fields for the current language. Typically a "field_invoke" thing, but currently would have to be hardcoded in field.default.inc instead of done by locale.module or translation.module or whatever.

πŸ“Œ Task
Status

Closed: outdated

Version

9.5

Component
FieldΒ  β†’

Last updated 1 day ago

Created by

πŸ‡«πŸ‡·France yched

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    As there hasn't been movement in 12 years not sure this is a needed task. But if anyone disagree please reopen explaining why and updating issue summary for D10 and up.

    Thanks!

Production build 0.71.5 2024