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.
The code in LinkFormatter::prepareView() is strictly value per value, does not benefit from the "multiple entities" aspect of prepareView().
What's being done here could totally be inlined in viewElements() - however, it is also used by LinkSeparateFormatter, which extends LinkFormatter. So it should be moved to a protected helper method, called for each item in viewElements() in both classes.
Comment | File | Size | Author |
---|---|---|---|
#1 | LinkFormatter-prepareView-2047753-1.patch | 4.76 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedPatch
Comment #2
effulgentsia CreditAttribution: effulgentsia commentedMakes complete sense.
Comment #3
alexpottCommitted c35607f and pushed to 8.x. Thanks!
Comment #4.0
(not verified) CreditAttribution: commentedtypo