You are here

public function DuplicateFieldConstraintValidator::__construct in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/Validation/Constraint/DuplicateFieldConstraintValidator.php \Drupal\jsonapi_extras\Plugin\Validation\Constraint\DuplicateFieldConstraintValidator::__construct()
  2. 8.2 src/Plugin/Validation/Constraint/DuplicateFieldConstraintValidator.php \Drupal\jsonapi_extras\Plugin\Validation\Constraint\DuplicateFieldConstraintValidator::__construct()

DuplicateFieldConstraintValidator constructor.

File

src/Plugin/Validation/Constraint/DuplicateFieldConstraintValidator.php, line 24

Class

DuplicateFieldConstraintValidator
The validator.

Namespace

Drupal\jsonapi_extras\Plugin\Validation\Constraint

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager = NULL) {
  $this->entityTypeManager = $entityTypeManager ?: \Drupal::entityTypeManager();
}