Same name and namespace in other branches
- 8.9.x core/modules/workflows/src/Annotation/WorkflowType.php \Drupal\workflows\Annotation\WorkflowType
- 9 core/modules/workflows/src/Annotation/WorkflowType.php \Drupal\workflows\Annotation\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 AnnotationInterface
- class \Drupal\workflows\Annotation\WorkflowType
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 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
6 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
1 |
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
1 |
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
1 |
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 3 |
WorkflowType:: |
public | property | A list of optional form classes implementing PluginFormInterface. | |
WorkflowType:: |
public | property | The plugin ID. | |
WorkflowType:: |
public | property | The label of the workflow. | |
WorkflowType:: |
public | property | States required to exist. |