protected function copyFormValuesToEntity(EntityInterface
$entity, array
$form, FormStateInterface
$form_state) { if (!
$form_state->
isValidationComplete()) { // Only do something once form validation is complete.
return;
} /** @var \Drupal\workflows\WorkflowInterface $entity */
$values =
$form_state->
getValues();
$form_state->
set('created_transition', FALSE
);
$entity->
getTypePlugin()->
setTransitionLabel($values['id'
],
$values['label'
]);
$entity->
getTypePlugin()->
setTransitionFromStates($values['id'
],
array_filter($values['from'
]));
} /**
* {@inheritdoc}
*/
public function save(array
$form, FormStateInterface
$form_state) { /** @var \Drupal\workflows\WorkflowInterface $workflow */
$workflow =
$this->entity;
$workflow_type =
$workflow->
getTypePlugin();
$transition =
$workflow_type->
getTransition($this->transitionId
);