Problem/Motivation
\Drupal\workspaces\Controller\WorkspacesHtmlEntityFormController::getContentResult()
calls ::getFormObject()
once at the beginning of the method to retrieve the entity from the form object, and again at the end through the call to ::getContentResult()
on the inner service.
Steps to reproduce
- add a breakpoint in a hook_entity_create() implementation and load the entity add page for a workspace-supported entity type
- notice that the breakpoint gets hit twice
Proposed resolution
Retrieve the entity "manually" from the route match object.
Remaining tasks
Review.
User interface changes
Nope.
Introduced terminology
None.
API changes
Nope.
Data model changes
Nope.
Release notes snippet
Nope.