class EntityValidationException extends MigrateException (View source)

To throw when an entity generated during the import is not valid.

Constants

MESSAGES_SEPARATOR

The separator for combining multiple messages into a single string.

Afterwards, the separator could be used to split a concatenated string onto multiple lines.

Properties

protected int $level

The level of the error being reported.

from  MigrateException
protected int $status

The status to record in the map table for the current item.

from  MigrateException
protected EntityConstraintViolationListInterface $violations

The list of violations generated during the entity validation.

Methods

__construct(EntityConstraintViolationListInterface $violations)

EntityValidationException constructor.

int
getLevel()

Gets the level.

int
getStatus()

Gets the status of the current item.

string[]
getViolationMessages()

Returns the list of violation messages.

getViolations()

Returns the list of violations generated during the entity validation.

Details

__construct(EntityConstraintViolationListInterface $violations)

EntityValidationException constructor.

Parameters

EntityConstraintViolationListInterface $violations

The list of violations generated during the entity validation.

int getLevel()

Gets the level.

Return Value

int

An integer status code. Migration::MESSAGE_*

int getStatus()

Gets the status of the current item.

Return Value

int

An integer status code. MigrateMap::STATUS_*

string[] getViolationMessages()

Returns the list of violation messages.

Return Value

string[]

The list of violation messages.

EntityConstraintViolationListInterface getViolations()

Returns the list of violations generated during the entity validation.

Return Value

EntityConstraintViolationListInterface

The list of violations generated during the entity validation.