class WorkflowType
Same name in other branches
- 9 core/modules/workflows/src/Annotation/WorkflowType.php \Drupal\workflows\Annotation\WorkflowType
- 10 core/modules/workflows/src/Attribute/WorkflowType.php \Drupal\workflows\Attribute\WorkflowType
- 10 core/modules/workflows/src/Annotation/WorkflowType.php \Drupal\workflows\Annotation\WorkflowType
- 11.x core/modules/workflows/src/Attribute/WorkflowType.php \Drupal\workflows\Attribute\WorkflowType
- 11.x core/modules/workflows/src/Annotation/WorkflowType.php \Drupal\workflows\Annotation\WorkflowType
Defines an Workflow type annotation object.
Plugin Namespace: Plugin\WorkflowType
For a working example, see \Drupal\content_moderation\Plugin\Workflow\ContentModerate
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements \Drupal\Component\Annotation\AnnotationInterface
- class \Drupal\workflows\Annotation\WorkflowType extends \Drupal\Component\Annotation\Plugin
Expanded class hierarchy of WorkflowType
See also
\Drupal\workflows\WorkflowTypeInterface
\Drupal\workflows\WorkflowTypeManager
workflow_type_info_alter()
Related topics
1 file declares its use of WorkflowType
- WorkflowTypeManager.php in core/
modules/ workflows/ src/ WorkflowTypeManager.php
6 classes are annotated with WorkflowType
- ComplexTestType in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ ComplexTestType.php - Test workflow type.
- ContentModeration in core/
modules/ content_moderation/ src/ Plugin/ WorkflowType/ ContentModeration.php - Attaches workflows to content entity types and their bundles.
- PredefinedStatesWorkflowTestType in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ PredefinedStatesWorkflowTestType.php - Test workflow type.
- RequiredStateTestType in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ RequiredStateTestType.php - Test workflow type.
- TestType in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ TestType.php - Test workflow type.
File
-
core/
modules/ workflows/ src/ Annotation/ WorkflowType.php, line 21
Namespace
Drupal\workflows\AnnotationView source
class WorkflowType extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The label of the workflow.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label = '';
/**
* States required to exist.
*
* Normally supplied by WorkflowType::defaultConfiguration().
*
* @var array
*/
public $required_states = [];
/**
* A list of optional form classes implementing PluginFormInterface.
*
* Forms which will be used for the workflow UI are:
* - 'configure' (\Drupal\workflows\WorkflowTypeInterface::PLUGIN_FORM_KEY)
* - 'state' (\Drupal\workflows\StateInterface::PLUGIN_FORM_KEY)
* - 'transition' (\Drupal\workflows\TransitionInterface::PLUGIN_FORM_KEY)
*
* @see \Drupal\Core\Plugin\PluginWithFormsInterface
* @see \Drupal\Core\Plugin\PluginFormInterface
* @see \Drupal\workflows\Plugin\WorkflowTypeConfigureFormBase
* @see \Drupal\workflows\Plugin\WorkflowTypeStateFormBase
* @see \Drupal\workflows\Plugin\WorkflowTypeTransitionFormBase
* @see \Drupal\workflows\WorkflowTypeInterface::PLUGIN_FORM_KEY
* @see \Drupal\workflows\StateInterface::PLUGIN_FORM_KEY
* @see \Drupal\workflows\TransitionInterface::PLUGIN_FORM_KEY
*
* @var array
*/
public $forms = [];
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Plugin::$definition | protected | property | The plugin definition read from the class annotation. | 1 | |
Plugin::get | public | function | Gets the value of an annotation. | Overrides AnnotationInterface::get | 5 |
Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | |
Plugin::getId | public | function | Gets the unique ID for this annotated class. | Overrides AnnotationInterface::getId | |
Plugin::getProvider | public | function | Gets the name of the provider of the annotated class. | Overrides AnnotationInterface::getProvider | 1 |
Plugin::parse | protected | function | Parses an annotation into its definition. | ||
Plugin::setClass | public | function | Sets the class of the annotated class. | Overrides AnnotationInterface::setClass | |
Plugin::setProvider | public | function | Sets the name of the provider of the annotated class. | Overrides AnnotationInterface::setProvider | |
Plugin::__construct | public | function | Constructs a Plugin object. | 2 | |
WorkflowType::$forms | public | property | A list of optional form classes implementing PluginFormInterface. | ||
WorkflowType::$id | public | property | The plugin ID. | ||
WorkflowType::$label | public | property | The label of the workflow. | ||
WorkflowType::$required_states | public | property | States required to exist. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.