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.
API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
> $items: (optional) The entity field object on which the operation is to be performed.
When is this parameter not given?
Comment | File | Size | Author |
---|---|---|---|
#4 | hook_entity_field_access-docs-2958744-4.patch | 853 bytes | msankhala |
Comments
Comment #2
BerdirWhen the caller doesn't have $items/an entity. A common example is views checking access to display a table column or not.
Not sure what you want to deprecate, anyone could call it for whatever reason. If you want to document something then what it means, not when it happens.
Comment #3
joachim CreditAttribution: joachim as a volunteer commented> Not sure what you want to deprecate, anyone could call it for whatever reason. If you want to document something then what it means, not when it happens.
I'm not suggesting we deprecate anything.
And what I mean is that we should document under what circumstances $items is not given.
It looks like the documentation from https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21... could be copied here.
Comment #4
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedHere is a patch.
Comment #5
msankhala CreditAttribution: msankhala as a volunteer and at Srijan | A Material+ Company commentedComment #6
joachim CreditAttribution: joachim as a volunteer commentedThanks for the patch!
Comment #7
alexpottCommitted and pushed 2a7952f2bf to 8.6.x and e9be40977d to 8.5.x. Thanks!
Backported to 8.5.x as this is a docs change only.
Credited @joachim for creating the issue and reviewing.
Comment #11
Wim LeersThese docs should've been added in #1994140: Unify entity field access and Field API access.