You are here

public function WorkflowStateActionBase::submitConfigurationForm in Workflow 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides PluginFormInterface::submitConfigurationForm

File

src/Plugin/Action/WorkflowStateActionBase.php, line 214

Class

WorkflowStateActionBase
Sets an entity to a new, given state.

Namespace

Drupal\workflow\Plugin\Action

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $configuration = $form_state
    ->getValue('workflow_transition_action_config');

  // Remove the transition: generates an error upon saving the action definition.
  unset($configuration['workflow_transition']);
  $this->configuration = $configuration;
}