Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently it is not possible to possible to get information about the reference field inside a field callback (which was introduced with this commit).
I would suggest that we prepare render arguments for render those callbacks. My patch does not break the current API because it just adds a new parameter for the context.
Comments
Comment #1
yannickooComment #2
yannickooComment #3
yannickooComment #4
yannickooComment #5
yannickooComment #6
Paulmicha CreditAttribution: Paulmicha as a volunteer commentedI've just successfully tested this patch against 7.x-1.6 (in case anyone else was wondering if that patch from nov.2014 was still working).
Comment #7
Arlina CreditAttribution: Arlina as a volunteer and at Chapter Three commentedTested patch and updated to work against current 7.x-1.8.
Comment #9
deanflory CreditAttribution: deanflory as a volunteer commentedPatch "inline_entity_form-pass_render_arguments-2375895-5.patch" FAILs to apply to the latest 1.8 release and the patch in #7 fails tests.
Comment #10
jwineichen CreditAttribution: jwineichen commentedI think this feature would be great.
Comment #11
icurk CreditAttribution: icurk commentedHere is an updated patch that works with 7.x-1.9.