You are here

public function ContentModeration::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::__construct()

Constructs a ContentModeration object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\content_moderation\ModerationInformationInterface $moderation_info: Moderation information service.

Overrides WorkflowTypeBase::__construct

File

core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php, line 73

Class

ContentModeration
Attaches workflows to content entity types and their bundles.

Namespace

Drupal\content_moderation\Plugin\WorkflowType

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, ModerationInformationInterface $moderation_info) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->moderationInfo = $moderation_info;
}