Problem/Motivation

When creating the plugin through FocalPointEffectBase::create it needs the manager injected as well. In the creation method the manager is constructed every time, so there as many manager as there are instances. The plugin pattern in D8 core follows 1 manager instance for all plugin instances managed by it.

Proposed resolution

Define a service for the manager and inject that directly, so it can skip the creation step on every instance.

Remaining tasks

Patch, etc...

User interface changes

None.

API changes

None - implementation detail.

Data model changes

None.

Release notes snippet

None.

CommentFileSizeAuthor
#3 3021400-3.patch655 bytesndobromirov

Comments

ndobromirov created an issue. See original summary.

ndobromirov’s picture

Issue summary: View changes
ndobromirov’s picture

Status: Active » Needs review
StatusFileSize
new655 bytes

Here is a patch that implements the issue description.

  • bleen committed 6cc20c7 on 8.x-1.x authored by ndobromirov
    Issue #3021400 by ndobromirov: Do not create new manager instance for...
bleen’s picture

Status: Needs review » Fixed

Yes, of course!

Status: Fixed » Closed (fixed)

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