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 ListItemProcessor plugin only displays labels for fields added via field.module, e.g. fields that are stored as config entities.
I've patched this plugin to also query the base field definitions.
Currently it only looks up fields on the entity without a bundle.
Haven't added a test yet, either!
I'm looking for feedback to see if this is the right way to do it, or not.
Comment | File | Size | Author |
---|---|---|---|
#11 | display_labels_for-2709515-11.patch | 12.51 KB | borisson_ |
Comments
Comment #2
bc CreditAttribution: bc commentedComment #3
borisson_Thanks for the bug report and that patch, I think this is the right way to do it. I'd love to get a test in for this as well. Setting this to Needs Review for the testbot.
Comment #4
bc CreditAttribution: bc commentedCool, I'll work on the test.
Currently this class is covered by tests/src/Unit/Plugin/processor/LimitItemProcessorTest.php -- should it be called ListItemProcessorTest instead?
Comment #7
borisson_Yes, that class should be renamed, great catch.
Comment #8
bc CreditAttribution: bc commentedOK, I set up a test & also removed some dupe code from my earlier stab.
Comment #9
bc CreditAttribution: bc commentedComment #10
bc CreditAttribution: bc commentedThis might not handle the case of an entity having additional base properties on a certain bundle.. if that's a thing?
Comment #11
borisson_@bc: I don't think that's a thing.
Attached are some docs changes, will commit this later this week.
Comment #12
bc CreditAttribution: bc commentedCool, thanks for the style fixes; i don't know why i camelcased there :)
Comment #13
borisson_Thanks for the issue as well as the fix, committed.