is there any way that by code can assign a type of content to a workflow? I have reviewed the workflow module but I have not managed to find a method or a service that allows me to do it.
What I am trying to emulate is the action that makes this modal (programmatically not visually):
The only way I have found is by manipulating the workflows.workflow.myworkflow.yml
Per I'm trying to find a cleaner way.
Does anybody have an idea?