You are here

public function ValidDynamicReferenceConstraintValidator::__construct in Dynamic Entity Reference 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Validation/Constraint/ValidDynamicReferenceConstraintValidator.php \Drupal\dynamic_entity_reference\Plugin\Validation\Constraint\ValidDynamicReferenceConstraintValidator::__construct()

Constructs a ValidReferenceConstraintValidator object.

Parameters

\Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface $selection_manager: The selection plugin manager.

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

File

src/Plugin/Validation/Constraint/ValidDynamicReferenceConstraintValidator.php, line 41

Class

ValidDynamicReferenceConstraintValidator
Checks if referenced entities are valid.

Namespace

Drupal\dynamic_entity_reference\Plugin\Validation\Constraint

Code

public function __construct(SelectionPluginManagerInterface $selection_manager, EntityTypeManagerInterface $entity_type_manager) {
  $this->selectionManager = $selection_manager;
  $this->entityTypeManager = $entity_type_manager;
}