3 namespace Drupal\workflow_type_test\Form;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\workflows\Plugin\WorkflowTypeStateFormBase;
9 * Form to configure the complex test workflow states.
11 * @see \Drupal\workflow_type_test\Plugin\WorkflowType\ComplexTestType
13 class ComplexTestTypeStateForm extends WorkflowTypeStateFormBase {
18 public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
19 $state = $form_state->get('state');
20 $configuration = $this->workflowType->getConfiguration();
22 '#type' => 'textfield',
23 '#title' => $this->t('Extra'),
24 '#description' => $this->t('Extra information added to state'),
25 '#default_value' => $state && isset($configuration['states'][$state->id()]['extra']) ? $configuration['states'][$state->id()]['extra'] : '',