function ModerationStateConstraintValidator::__construct
Same name in other branches
- 8.9.x core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator::__construct()
- 10 core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator::__construct()
- 11.x core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator::__construct()
Creates a new ModerationStateConstraintValidator instance.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\content_moderation\ModerationInformationInterface $moderation_information: The moderation information.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\content_moderation\StateTransitionValidationInterface $state_transition_validation: The state transition validation service.
File
-
core/
modules/ content_moderation/ src/ Plugin/ Validation/ Constraint/ ModerationStateConstraintValidator.php, line 60
Class
- ModerationStateConstraintValidator
- Checks if a moderation state transition is valid.
Namespace
Drupal\content_moderation\Plugin\Validation\ConstraintCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, ModerationInformationInterface $moderation_information, AccountInterface $current_user, StateTransitionValidationInterface $state_transition_validation) {
$this->entityTypeManager = $entity_type_manager;
$this->moderationInformation = $moderation_information;
$this->currentUser = $current_user;
$this->stateTransitionValidation = $state_transition_validation;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.