3 namespace Drupal\workflows\Annotation;
5 use Drupal\Component\Annotation\Plugin;
8 * Defines an Workflow type annotation object.
10 * Plugin Namespace: Plugin\WorkflowType
12 * For a working example, see \Drupal\content_moderation\Plugin\Workflow\ContentModerate
14 * @see \Drupal\workflows\WorkflowTypeInterface
15 * @see \Drupal\workflows\WorkflowTypeManager
16 * @see workflow_type_info_alter()
21 class WorkflowType extends Plugin {
31 * The label of the workflow.
33 * @var \Drupal\Core\Annotation\Translation
35 * @ingroup plugin_translatable
40 * States required to exist.
42 * Normally supplied by WorkflowType::defaultConfiguration().
46 public $required_states = [];
49 * A list of optional form classes implementing PluginFormInterface.
51 * Forms which will be used for the workflow UI are:
52 * - 'configure' (\Drupal\workflows\WorkflowTypeInterface::PLUGIN_FORM_KEY)
53 * - 'state' (\Drupal\workflows\StateInterface::PLUGIN_FORM_KEY)
54 * - 'transition' (\Drupal\workflows\TransitionInterface::PLUGIN_FORM_KEY)
56 * @see \Drupal\Core\Plugin\PluginWithFormsInterface
57 * @see \Drupal\Core\Plugin\PluginFormInterface
58 * @see \Drupal\workflows\Plugin\WorkflowTypeConfigureFormBase
59 * @see \Drupal\workflows\Plugin\WorkflowTypeStateFormBase
60 * @see \Drupal\workflows\Plugin\WorkflowTypeTransitionFormBase
61 * @see \Drupal\workflows\WorkflowTypeInterface::PLUGIN_FORM_KEY
62 * @see \Drupal\workflows\StateInterface::PLUGIN_FORM_KEY
63 * @see \Drupal\workflows\TransitionInterface::PLUGIN_FORM_KEY