You are here

public function CreateModeratedForwardRevision::__construct in Acquia Content Hub 8.2

CreateModeratedForwardRevision constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The Entity Type Manager Service.

\Drupal\Core\Config\ConfigFactory $config_factory: The Config Factory.

\Drupal\content_moderation\ModerationInformationInterface $moderation_info: The Content Moderation Information Service.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger factory.

File

modules/acquia_contenthub_moderation/src/EventSubscriber/PreEntitySave/CreateModeratedForwardRevision.php, line 69

Class

CreateModeratedForwardRevision
Sets the entity with a forward revision and change of moderation state.

Namespace

Drupal\acquia_contenthub_moderation\EventSubscriber\PreEntitySave

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, ConfigFactory $config_factory, ModerationInformationInterface $moderation_info, LoggerChannelFactoryInterface $logger_factory) {
  $this->entityTypeManager = $entity_type_manager;
  $this->config = $config_factory
    ->get('acquia_contenthub_moderation.settings');
  $this->moderationInfo = $moderation_info;
  $this->channel = $logger_factory
    ->get('acquia_contenthub_moderation');
}