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

CommentFileSizeAuthor
#1 2082157.patch13.4 KBdamiankloip
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

damiankloip’s picture

Status: Active » Needs review
FileSize
13.4 KB

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

Perfect!

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.