Follow-up from #2071019: Allow the block category for Views block displays to be edited.

Updated: Comment #0


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


API changes

newDisplay() will move to the proper class

#1 2082157.patch13.4 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 58,758 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


damiankloip’s picture

Status: Active » Needs review
13.4 KB
PASSED: [[SimpleTest]]: [MySQL] 58,758 pass(es). View

Yes, 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....

dawehner’s picture

Status: Needs review » Reviewed & tested by the community


webchick’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Approved API change

Since the parent issue is currently "needs work," getting this in in the meantime.

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.