CommandHandlerInterface
interface CommandHandlerInterface (View source)
| internal | no public API, because commands are no extension points of the CR |
Common interface for all Content Repository command handlers
The {\Neos\ContentRepository\Core\CommandHandler\CommandHandlingDependencies} are available during handling to do soft-constraint checks
Methods
bool
handle(CommandInterface|RebasableToOtherWorkspaceInterface $command, CommandHandlingDependencies $commandHandlingDependencies)
"simple" command handlers return EventsToPublish directly
Details
bool
canHandle(CommandInterface|RebasableToOtherWorkspaceInterface $command)
No description
EventsToPublish|Generator
handle(CommandInterface|RebasableToOtherWorkspaceInterface $command, CommandHandlingDependencies $commandHandlingDependencies)
"simple" command handlers return EventsToPublish directly
For the case of the workspace command handler that need to publish to many streams and "close" the content-stream directly, it's allowed to yield the events to interact with the control flow of event publishing.