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

Files: 
CommentFileSizeAuthor
#1 2082157.patch13.4 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 58,758 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new13.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....

Status:Needs review» Reviewed & tested by the community

Perfect!

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.