Our client needs to have a multistep form for a custom entity. The idea is that users will have their own single profile to modify. Looks like the forms_steps module does a lot of work out of the box. But since users won't be able to create more than one profile we need to remove the workflow_id
parameter from the URL and get it from another location. Seems it's not a big problem thanks to a good module architecture. The only issue we faced right now is getting the workflow instance ID. In some pieces of code, we are getting it directly from the request on other ones using the FormsStepsHelper::getWorkflowInstanceIdFromRoute()
method. Getting workflow_id
directly from the request means that we need to duplicate a lot of code in order to change one line, e.g. WorkflowManager::entityInsert
and WorkflowManager::entityPreSave
.
Move getting of the instance_id to the FormsStepsHelper
service. This approach will allow other modules to decorate it, in case they want to override the getWorkflowInstanceIdFromRoute
method.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.