You are here

public function NodeTitleConstraintValidator::__construct in Node Title Validation 1.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Validation/Constraint/NodeTitleConstraintValidator.php \Drupal\node_title_validation\Plugin\Validation\Constraint\NodeTitleConstraintValidator::__construct()
  2. 2.0.x src/Plugin/Validation/Constraint/NodeTitleConstraintValidator.php \Drupal\node_title_validation\Plugin\Validation\Constraint\NodeTitleConstraintValidator::__construct()

Constructs a new NodeTitleConstraintValidator.

Parameters

\Drupal\Core\Entity\EntityTypeManager $entityTypeManager: Entity type manager service.

\Drupal\Core\Config\ConfigFactory $configFactory: Config factory service.

\Drupal\Core\StringTranslation\TranslationInterface $stringTranslation: The string translation.

File

src/Plugin/Validation/Constraint/NodeTitleConstraintValidator.php, line 57

Class

NodeTitleConstraintValidator
Validates the NodeTitleValidate constraint.

Namespace

Drupal\node_title_validation\Plugin\Validation\Constraint

Code

public function __construct(EntityTypeManager $entityTypeManager, ConfigFactory $configFactory, TranslationInterface $stringTranslation) {
  $this->entityTypeManager = $entityTypeManager;
  $this->configFactory = $configFactory;
  $this->stringTranslation = $stringTranslation;
}