class ComplexTestType
Test workflow type.
Attributes
#[WorkflowType(id: 'workflow_type_complex_test', label: new TranslatableMarkup('Workflow Type Complex Test'), forms: [
'configure' => '\\Drupal\\workflow_type_test\\Form\\ComplexTestTypeConfigureForm',
'state' => '\\Drupal\\workflow_type_test\\Form\\ComplexTestTypeStateForm',
'transition' => '\\Drupal\\workflow_type_test\\Form\\ComplexTestTypeTransitionForm',
])]
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\DependencyInjection\AutowiredInstanceTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
- class \Drupal\Core\Plugin\ConfigurablePluginBase implements \Drupal\Component\Plugin\ConfigurableInterface uses \Drupal\Core\Plugin\ConfigurableTrait extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\workflows\Plugin\WorkflowTypeBase implements \Drupal\workflows\WorkflowTypeInterface uses \Drupal\Core\Plugin\PluginWithFormsTrait extends \Drupal\Core\Plugin\ConfigurablePluginBase
- class \Drupal\workflow_type_test\Plugin\WorkflowType\ComplexTestType uses \Drupal\Core\StringTranslation\StringTranslationTrait extends \Drupal\workflows\Plugin\WorkflowTypeBase
- class \Drupal\workflows\Plugin\WorkflowTypeBase implements \Drupal\workflows\WorkflowTypeInterface uses \Drupal\Core\Plugin\PluginWithFormsTrait extends \Drupal\Core\Plugin\ConfigurablePluginBase
- class \Drupal\Core\Plugin\ConfigurablePluginBase implements \Drupal\Component\Plugin\ConfigurableInterface uses \Drupal\Core\Plugin\ConfigurableTrait extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\DependencyInjection\AutowiredInstanceTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of ComplexTestType
1 file declares its use of ComplexTestType
- ComplexWorkflowTypeTest.php in core/
modules/ workflows/ tests/ src/ Kernel/ ComplexWorkflowTypeTest.php
File
-
core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ ComplexTestType.php, line 15
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeView source
class ComplexTestType extends WorkflowTypeBase {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public function onDependencyRemoval(array $dependencies) {
// Always return TRUE to allow the logic in
// \Drupal\workflows\Entity\Workflow::onDependencyRemoval() to be tested.
return TRUE;
}
/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return parent::defaultConfiguration() + [
'example_setting' => '',
];
}
}
Members
| Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
|---|---|---|---|---|---|---|
| AutowiredInstanceTrait::createInstanceAutowired | public static | function | Instantiates a new instance of the implementing class using autowiring. | |||
| ComplexTestType::defaultConfiguration | public | function | Gets default configuration for this plugin. | Overrides WorkflowTypeBase::defaultConfiguration | ||
| ComplexTestType::onDependencyRemoval | public | function | Informs the plugin that a dependency of the workflow will be deleted. | Overrides WorkflowTypeBase::onDependencyRemoval | ||
| ConfigurablePluginBase::__construct | public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | Overrides PluginBase::__construct | 5 | |
| ConfigurableTrait::$configuration | protected | property | Configuration information passed into the plugin. | |||
| ConfigurableTrait::getConfiguration | public | function | Gets this plugin's configuration. | 3 | ||
| DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | |||
| DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | |||
| DependencySerializationTrait::__sleep | public | function | 2 | |||
| DependencySerializationTrait::__wakeup | public | function | 2 | |||
| MessengerTrait::$messenger | protected | property | The messenger. | 25 | ||
| MessengerTrait::messenger | public | function | Gets the messenger. | 25 | ||
| MessengerTrait::setMessenger | public | function | Sets the messenger. | |||
| PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | 1 | ||
| PluginBase::$pluginId | protected | property | The plugin ID. | |||
| PluginBase::create | public static | function | Instantiates a new instance of the implementing class using autowiring. | 165 | ||
| PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||||
| PluginBase::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | Overrides DerivativeInspectionInterface::getBaseId | ||
| PluginBase::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | Overrides DerivativeInspectionInterface::getDerivativeId | ||
| PluginBase::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | Overrides PluginInspectionInterface::getPluginDefinition | 2 | |
| PluginBase::getPluginId | public | function | Gets the plugin ID of the plugin instance. | Overrides PluginInspectionInterface::getPluginId | ||
| PluginBase::isConfigurable | Deprecated | 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(). | |||
| StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | ||
| StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | |||
| StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | |||
| StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | |||
| StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | ||
| StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | 1 | ||
| WorkflowTypeBase::addState | public | function | Adds a state to the workflow. | Overrides WorkflowTypeInterface::addState | 1 | |
| WorkflowTypeBase::addTransition | public | function | Adds a transition to the workflow. | Overrides WorkflowTypeInterface::addTransition | ||
| WorkflowTypeBase::calculateDependencies | public | function | Calculates dependencies for the configured plugin. | Overrides DependentPluginInterface::calculateDependencies | 1 | |
| WorkflowTypeBase::deleteState | public | function | Deletes a state from the workflow. | Overrides WorkflowTypeInterface::deleteState | 1 | |
| WorkflowTypeBase::deleteTransition | public | function | Deletes a transition. | Overrides WorkflowTypeInterface::deleteTransition | ||
| WorkflowTypeBase::getInitialState | public | function | Gets the initial state for the workflow. | Overrides WorkflowTypeInterface::getInitialState | 1 | |
| WorkflowTypeBase::getNextWeight | protected | function | Gets the weight for a new state or transition. | |||
| WorkflowTypeBase::getRequiredStates | public | function | Gets the required states of workflow type. | Overrides WorkflowTypeInterface::getRequiredStates | 1 | |
| WorkflowTypeBase::getState | public | function | Gets a workflow state. | Overrides WorkflowTypeInterface::getState | 2 | |
| WorkflowTypeBase::getStates | public | function | Gets state objects for the provided state IDs. | Overrides WorkflowTypeInterface::getStates | 1 | |
| WorkflowTypeBase::getTransition | public | function | Gets a transition object for the provided transition ID. | Overrides WorkflowTypeInterface::getTransition | ||
| WorkflowTypeBase::getTransitionFromStateToState | public | function | Gets a transition from state to state. | Overrides WorkflowTypeInterface::getTransitionFromStateToState | ||
| WorkflowTypeBase::getTransitionIdFromStateToState | protected | function | Gets the transition ID from state to state. | |||
| WorkflowTypeBase::getTransitions | public | function | Gets transition objects for the provided transition IDs. | Overrides WorkflowTypeInterface::getTransitions | ||
| WorkflowTypeBase::getTransitionsForState | public | function | Gets the transitions for a state for the provided direction. | Overrides WorkflowTypeInterface::getTransitionsForState | ||
| WorkflowTypeBase::hasState | public | function | Determines if the workflow has a state with the provided ID. | Overrides WorkflowTypeInterface::hasState | 1 | |
| WorkflowTypeBase::hasTransition | public | function | Determines if a transition exists. | Overrides WorkflowTypeInterface::hasTransition | ||
| WorkflowTypeBase::hasTransitionFromStateToState | public | function | Determines if a transition from state to state exists. | Overrides WorkflowTypeInterface::hasTransitionFromStateToState | ||
| WorkflowTypeBase::label | public | function | Gets the label for the workflow type. | Overrides WorkflowTypeInterface::label | ||
| WorkflowTypeBase::labelWeightMultisort | protected static | function | Sort states or transitions by weight, label, and key. | |||
| WorkflowTypeBase::setConfiguration | public | function | Sets the configuration for this plugin instance. | Overrides ConfigurableTrait::setConfiguration | ||
| WorkflowTypeBase::setStateLabel | public | function | Sets a state's label. | Overrides WorkflowTypeInterface::setStateLabel | 1 | |
| WorkflowTypeBase::setStateWeight | public | function | Sets a state's weight value. | Overrides WorkflowTypeInterface::setStateWeight | 1 | |
| WorkflowTypeBase::setTransitionFromStates | public | function | Sets a transition's from states. | Overrides WorkflowTypeInterface::setTransitionFromStates | ||
| WorkflowTypeBase::setTransitionLabel | public | function | Sets a transition's label. | Overrides WorkflowTypeInterface::setTransitionLabel | ||
| WorkflowTypeBase::setTransitionWeight | public | function | Sets a transition's weight. | Overrides WorkflowTypeInterface::setTransitionWeight | ||
| WorkflowTypeBase::VALID_ID_REGEX | constant | A regex for matching a valid state/transition machine name. | ||||
| WorkflowTypeBase::workflowHasData | public | function | Determines if the workflow is being has data associated with it. | Overrides WorkflowTypeInterface::workflowHasData | 1 | |
| WorkflowTypeBase::workflowStateHasData | public | function | Determines if the workflow state has data associated with it. | Overrides WorkflowTypeInterface::workflowStateHasData | 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.