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.
Parent Issue
#2359437: [meta] Remove entity_load* family of functions usage from the code base
Problem/Motivation
There are case where entities of the entity_test family of entity types are retrieved using the functional loader, entity_load*()
The entity types to be changed are:
- entity_test
- entity_test_rev
- entity_test_ml
- entity_test_mulrev
These entity types are handled in one sub-issue, because they are tightly related, and are exposed by the same module
Proposed resolution
Replace calls to entity_load*('entity_test*', ...)
with EntityTest*::load*()
or by using \Drupal::entityTypeManager()->getStorage('entity_test*')->load*(...)
Comment | File | Size | Author |
---|---|---|---|
#4 | 2723591-4.patch | 36.26 KB | marvin_B8 |
Comments
Comment #2
valthebaldComment #3
valthebaldComment #4
marvin_B8 CreditAttribution: marvin_B8 as a volunteer and at comm-press commentedComment #5
John Cook CreditAttribution: John Cook commentedThere are no more instances of
entity_load*('entity_test*', ...)
after applying the patch in #4.The patch only addresses the problem with this issue.
Comment #6
John Cook CreditAttribution: John Cook commentedUpdated summary.
Comment #7
catchCommitted 899cb52 and pushed to 8.2.x. Thanks!