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.
Sometimes it makes sense to alter the text output for empty rows for grammatical reasons. Assume an entity by the name 'IP Ranges' , the empty text is hardcoded within EntityListBuilder and reads
There is no IP Ranges yet.
This patch aims to allow Entity forms to override this text as desired.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2274011-5.drupal.entity-list-empty-text.patch | 1.47 KB | joachim |
#2 | entity-form-configurable-empty-row.patch | 1.43 KB | adammalone |
Comments
Comment #2
adammaloneugh, let's not patch against a repo with the git repo initialized above the webroot.
Comment #3
larowlanThis is a dupe
Comment #4
joachim CreditAttribution: joachim commentedI can't find a duplicate issue: https://www.drupal.org/project/issues/drupal?text=EntityListBuilder&stat...
Setting this to needs work, as docs need to be added for the new method.
Also, probably 8.1.x as it's a new feature?
Comment #5
joachim CreditAttribution: joachim commentedPatch needed a reroll. I've also changed the method name from emptyText() to getEmptyText() to match the other methods in the class.
On second thoughts, I'm not sure about adding a method to the interface -- are we ok to do that for 8.1.x? I've removed the @inheritdoc though as there's nothing to inherit from.
Comment #7
joachim CreditAttribution: joachim commented> Sometimes it makes sense to alter the text output for empty rows for grammatical reasons. Assume an entity by the name 'IP Ranges' , the empty text is hardcoded within EntityListBuilder and reads
Given the original requirement for this was awkward phrasing with plurals, is this still needed now that entity type have plural labels?
Comment #22
smustgrave CreditAttribution: smustgrave at Mobomo commentedIf still a valid feature request please reopen addressing #7.