Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / workflows / tests / modules / workflow_type_test / src / Form / ComplexTestTypeStateForm.php
1 <?php
2
3 namespace Drupal\workflow_type_test\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\workflows\Plugin\WorkflowTypeStateFormBase;
7
8 /**
9  * Form to configure the complex test workflow states.
10  *
11  * @see \Drupal\workflow_type_test\Plugin\WorkflowType\ComplexTestType
12  */
13 class ComplexTestTypeStateForm extends WorkflowTypeStateFormBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
19     $state = $form_state->get('state');
20     $configuration = $this->workflowType->getConfiguration();
21     $form['extra'] = [
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'] : '',
26     ];
27     return $form;
28   }
29
30 }