class EntityWorkspaceConflictConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface (View source)

Validates the EntityWorkspaceConflict constraint.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager.

protected WorkspaceManagerInterface $workspaceManager

The workspace manager service.

protected WorkspaceAssociationInterface $workspaceAssociation

The workspace association service.

protected WorkspaceRepositoryInterface $workspaceRepository

The workspace repository service.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager, WorkspaceManagerInterface $workspace_manager, WorkspaceAssociationInterface $workspace_association, WorkspaceRepositoryInterface $workspace_repository)

Constructs an EntityUntranslatableFieldsConstraintValidator object.

static 
create(ContainerInterface $container)

Instantiates a new instance of this class.

validate($entity, Constraint $constraint)

{@inheritdoc}

Details

__construct(EntityTypeManagerInterface $entity_type_manager, WorkspaceManagerInterface $workspace_manager, WorkspaceAssociationInterface $workspace_association, WorkspaceRepositoryInterface $workspace_repository)

Constructs an EntityUntranslatableFieldsConstraintValidator object.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager service.

WorkspaceManagerInterface $workspace_manager

The workspace manager service.

WorkspaceAssociationInterface $workspace_association

The workspace association service.

WorkspaceRepositoryInterface $workspace_repository

The Workspace repository service.

static create(ContainerInterface $container)

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

ContainerInterface $container

The service container this instance should use.

validate($entity, Constraint $constraint)

{@inheritdoc}

Parameters

$entity
Constraint $constraint