You are here

Content Moderation Workflow Type Plugin in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/content_moderation.api.php \content_moderation_plugin

The Workflow Type plugin implemented by Content Moderation links revisionable entities to workflows.

In the Content Moderation Workflow Type Plugin, one method requires the entity object to be passed in as a parameter, even though the interface defined by Workflows module doesn't require this:

$workflow_type_plugin
  ->getInitialState($entity);

This is used to determine the initial moderation state based on the publishing status of the entity.

File

core/modules/content_moderation/content_moderation.api.php, line 8
API documentation for Content Moderation module.