Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.Problem/Motivation
Workspace publisher and merger can't be overridden/injected without also creating a custom WorkspaceOperationFactory
Steps to reproduce
Proposed resolution
Workspace publisher and merger should be services.
Comments
Comment #2
djdevinComment #3
taraskorpachI suppose we cannot implement a factory completely based on the container.
We could add a method called
setSource()to theWorkspacePublisher, in which we might set the needed Workspace to the publisher property.In the
WorkspaceOperationFactory, we should call the new service for WorkspacePublisher like "workspaces.publisher" and then call the methodsetSource()from itself.Finally, the new method
getPublisher()ofWorkspaceOperationFactoryshould look like:Please explain if we could use the DI factory pattern here or review my approach.