public function ParagraphsLibraryItemHasAllowedParagraphsTypeConstraintValidator::__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

paragraphs/modules/paragraphs_library/src/Plugin/Validation/Constraint/ParagraphsLibraryItemHasAllowedParagraphsTypeConstraintValidator.php, line 48

Class

ParagraphsLibraryItemHasAllowedParagraphsTypeConstraintValidator
Validates that the library does not bypass Paragraphs type restrictions.

Namespace

Drupal\paragraphs_library\Plugin\Validation\Constraint

Code

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