public function ValidHierarchyReferenceConstraintValidator::__construct in Entity Reference Hierarchy 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Validation/Constraint/ValidHierarchyReferenceConstraintValidator.php \Drupal\entity_hierarchy\Plugin\Validation\Constraint\ValidHierarchyReferenceConstraintValidator::__construct()
Constructs a ValidReferenceConstraintValidator object.
Parameters
\Drupal\entity_hierarchy\Storage\NestedSetStorageFactory $nestedSetStorageFactory: Nested set factory.
\Drupal\entity_hierarchy\Storage\NestedSetNodeKeyFactory $keyFactory: Key factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
- src/
Plugin/ Validation/ Constraint/ ValidHierarchyReferenceConstraintValidator.php, line 50
Class
- ValidHierarchyReferenceConstraintValidator
- Checks if referenced entities are valid.
Namespace
Drupal\entity_hierarchy\Plugin\Validation\ConstraintCode
public function __construct(NestedSetStorageFactory $nestedSetStorageFactory, NestedSetNodeKeyFactory $keyFactory, EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
$this->nestedSetStorageFactory = $nestedSetStorageFactory;
$this->keyFactory = $keyFactory;
}