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.
Follow-up from #2071019: Allow the block category for Views block displays to be edited.
Updated: Comment #0
Problem/Motivation
The difference between View::newDisplay() and View::addDisplay() is very subtle.
Mainly, View::newDisplay() is used in the context of executing a view, when you need an actual instance back.
In fact, most of its code is wrapping addDisplay() and then working on ViewExecutable.
Proposed resolution
Move newDisplay() onto ViewExecutable.
Remaining tasks
Actually move it.
User interface changes
N/A
API changes
newDisplay() will move to the proper class
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#1 | 2082157.patch | 13.4 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedYes, I always wanted to move this, but never got round to it. Let's do this!
I'm guessing you're ok with me jumping in here....
Comment #2
dawehnerPerfect!
Comment #3
webchickSince the parent issue is currently "needs work," getting this in in the meantime.
Committed and pushed to 8.x. Thanks!