You are here

class TestType in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\TestType
  2. 9 core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\TestType

Test workflow type.

Plugin annotation


@WorkflowType(
  id = "workflow_type_test",
  label = @Translation("Workflow Type Test"),
)

Hierarchy

Expanded class hierarchy of TestType

4 files declare their use of TestType
StateTest.php in core/modules/workflows/tests/src/Unit/StateTest.php
StateTransitionValidationTest.php in core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php
TransitionTest.php in core/modules/workflows/tests/src/Unit/TransitionTest.php
WorkflowTest.php in core/modules/workflows/tests/src/Unit/WorkflowTest.php

File

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

Namespace

Drupal\workflow_type_test\Plugin\WorkflowType
View source
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', []);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function
PluginBase::getDerivativeId public function
PluginBase::getPluginDefinition public function 2
PluginBase::getPluginId public function
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginWithFormsTrait::getFormClass public function Implements \Drupal\Core\Plugin\PluginWithFormsInterface::getFormClass().
PluginWithFormsTrait::hasFormClass public function Implements \Drupal\Core\Plugin\PluginWithFormsInterface::hasFormClass().
TestType::getRequiredStates public function Gets the required states of workflow type. Overrides WorkflowTypeBase::getRequiredStates
WorkflowTypeBase::addState public function 1
WorkflowTypeBase::addTransition public function
WorkflowTypeBase::calculateDependencies public function
WorkflowTypeBase::defaultConfiguration public function 4
WorkflowTypeBase::deleteState public function 1
WorkflowTypeBase::deleteTransition public function
WorkflowTypeBase::getConfiguration public function
WorkflowTypeBase::getInitialState public function
WorkflowTypeBase::getNextWeight protected function Gets the weight for a new state or transition.
WorkflowTypeBase::getState public function 1
WorkflowTypeBase::getStates public function 1
WorkflowTypeBase::getTransition public function
WorkflowTypeBase::getTransitionFromStateToState public function
WorkflowTypeBase::getTransitionIdFromStateToState protected function Gets the transition ID from state to state.
WorkflowTypeBase::getTransitions public function
WorkflowTypeBase::getTransitionsForState public function
WorkflowTypeBase::hasState public function 1
WorkflowTypeBase::hasTransition public function
WorkflowTypeBase::hasTransitionFromStateToState public function
WorkflowTypeBase::label public function
WorkflowTypeBase::labelWeightMultisort protected static function Sort states or transitions by weight, label, and key.
WorkflowTypeBase::onDependencyRemoval public function 1
WorkflowTypeBase::setConfiguration public function
WorkflowTypeBase::setStateLabel public function 1
WorkflowTypeBase::setStateWeight public function 1
WorkflowTypeBase::setTransitionFromStates public function
WorkflowTypeBase::setTransitionLabel public function
WorkflowTypeBase::setTransitionWeight public function
WorkflowTypeBase::VALID_ID_REGEX constant A regex for matching a valid state/transition machine name.
WorkflowTypeBase::workflowHasData public function
WorkflowTypeBase::workflowStateHasData public function
WorkflowTypeBase::__construct public function
WorkflowTypeInterface::PLUGIN_FORM_KEY constant The key of the global workflow plugin form.