class WorkflowType
Defines a 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
File
-
core/
modules/ workflows/ src/ Annotation/ WorkflowType.php, line 22
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)
*
* @var array
*
* @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
*/
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 | 6 |
| Plugin::getClass | public | function | Gets the class of the annotated class. | Overrides AnnotationInterface::getClass | 1 |
| 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 | 1 |
| 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. | 3 | |
| 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.