TestType.php

Same filename and directory in other branches
  1. 11.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php
  2. 10 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php
  3. 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php
  4. main core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php

Namespace

Drupal\workflow_type_test\Plugin\WorkflowType

File

core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php

View source
<?php

namespace Drupal\workflow_type_test\Plugin\WorkflowType;

use Drupal\workflows\Plugin\WorkflowTypeBase;

/**
 * Test workflow type.
 *
 * @WorkflowType(
 *   id = "workflow_type_test",
 *   label = @Translation("Workflow Type Test"),
 * )
 */
class TestType extends WorkflowTypeBase {
  
  /**
   * {@inheritdoc}
   */
  public function getRequiredStates() {
    // Normally this is obtained from the annotation but we get from state to
    // allow dynamic testing.
    return \Drupal::state()->get('workflow_type_test.required_states', []);
  }

}

Classes

Title Deprecated Summary
TestType Test workflow type.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.