1<?php
2
3namespace Drupal\workflow_type_test\Plugin\WorkflowType;
4
5use Drupal\Core\StringTranslation\StringTranslationTrait;
6use Drupal\workflows\Plugin\WorkflowTypeBase;
7
8/**
9 * Test workflow type.
10 *
11 * @WorkflowType(
12 *   id = "workflow_type_complex_test",
13 *   label = @Translation("Workflow Type Complex Test"),
14 *   forms = {
15 *     "configure" = "\Drupal\workflow_type_test\Form\ComplexTestTypeConfigureForm",
16 *     "state" = "\Drupal\workflow_type_test\Form\ComplexTestTypeStateForm",
17 *     "transition" = "\Drupal\workflow_type_test\Form\ComplexTestTypeTransitionForm",
18 *   }
19 * )
20 */
21class ComplexTestType extends WorkflowTypeBase {
22
23  use StringTranslationTrait;
24
25  /**
26   * {@inheritdoc}
27   */
28  public function onDependencyRemoval(array $dependencies) {
29    // Always return TRUE to allow the logic in
30    // \Drupal\workflows\Entity\Workflow::onDependencyRemoval() to be tested.
31    return TRUE;
32  }
33
34  /**
35   * {@inheritdoc}
36   */
37  public function defaultConfiguration() {
38    return parent::defaultConfiguration() + [
39      'example_setting' => '',
40    ];
41  }
42
43}
44