class TestType

Same name and namespace in other branches
  1. 11.x 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
  3. 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\TestType
  4. main core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php \Drupal\workflow_type_test\Plugin\WorkflowType\TestType

Test workflow type.

Attributes

#[WorkflowType(id: 'workflow_type_test', label: new TranslatableMarkup('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 12

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

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
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 Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Overrides PluginInspectionInterface::getPluginId
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 Overrides WorkflowTypeBase::getRequiredStates
WorkflowTypeBase::addState public function Overrides WorkflowTypeInterface::addState 1
WorkflowTypeBase::addTransition public function Overrides WorkflowTypeInterface::addTransition
WorkflowTypeBase::calculateDependencies public function Overrides DependentPluginInterface::calculateDependencies 1
WorkflowTypeBase::defaultConfiguration public function Overrides ConfigurableInterface::defaultConfiguration 5
WorkflowTypeBase::deleteState public function Overrides WorkflowTypeInterface::deleteState 1
WorkflowTypeBase::deleteTransition public function Overrides WorkflowTypeInterface::deleteTransition
WorkflowTypeBase::getConfiguration public function Overrides ConfigurableInterface::getConfiguration 1
WorkflowTypeBase::getInitialState public function Overrides WorkflowTypeInterface::getInitialState 1
WorkflowTypeBase::getNextWeight protected function Gets the weight for a new state or transition.
WorkflowTypeBase::getState public function Overrides WorkflowTypeInterface::getState 2
WorkflowTypeBase::getStates public function Overrides WorkflowTypeInterface::getStates 1
WorkflowTypeBase::getTransition public function Overrides WorkflowTypeInterface::getTransition
WorkflowTypeBase::getTransitionFromStateToState public function Overrides WorkflowTypeInterface::getTransitionFromStateToState
WorkflowTypeBase::getTransitionIdFromStateToState protected function Gets the transition ID from state to state.
WorkflowTypeBase::getTransitions public function Overrides WorkflowTypeInterface::getTransitions
WorkflowTypeBase::getTransitionsForState public function Overrides WorkflowTypeInterface::getTransitionsForState
WorkflowTypeBase::hasState public function Overrides WorkflowTypeInterface::hasState 1
WorkflowTypeBase::hasTransition public function Overrides WorkflowTypeInterface::hasTransition
WorkflowTypeBase::hasTransitionFromStateToState public function Overrides WorkflowTypeInterface::hasTransitionFromStateToState
WorkflowTypeBase::label public function Overrides WorkflowTypeInterface::label
WorkflowTypeBase::labelWeightMultisort protected static function Sort states or transitions by weight, label, and key.
WorkflowTypeBase::onDependencyRemoval public function Overrides WorkflowTypeInterface::onDependencyRemoval 2
WorkflowTypeBase::setConfiguration public function Overrides ConfigurableInterface::setConfiguration
WorkflowTypeBase::setStateLabel public function Overrides WorkflowTypeInterface::setStateLabel 1
WorkflowTypeBase::setStateWeight public function Overrides WorkflowTypeInterface::setStateWeight 1
WorkflowTypeBase::setTransitionFromStates public function Overrides WorkflowTypeInterface::setTransitionFromStates
WorkflowTypeBase::setTransitionLabel public function Overrides WorkflowTypeInterface::setTransitionLabel
WorkflowTypeBase::setTransitionWeight public function Overrides WorkflowTypeInterface::setTransitionWeight
WorkflowTypeBase::VALID_ID_REGEX constant A regex for matching a valid state/transition machine name.
WorkflowTypeBase::workflowHasData public function Overrides WorkflowTypeInterface::workflowHasData 1
WorkflowTypeBase::workflowStateHasData public function Overrides WorkflowTypeInterface::workflowStateHasData 1
WorkflowTypeBase::__construct public function Overrides PluginBase::__construct 1
WorkflowTypeInterface::PLUGIN_FORM_KEY constant The key of the global workflow plugin form.

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