class PreUpdateEventArgs extends LifecycleEventArgs (View source)

Class that holds event arguments for a preInsert/preUpdate event.

Methods

object
getEntity()

Retrieves associated Entity.

getEntityManager()

Retrieves associated EntityManager.

__construct($entity, EntityManagerInterface $em, array $changeSet)

No description

mixed[]
getEntityChangeSet()

Retrieves entity changeset.

bool
hasChangedField(string $field)

Checks if field has a changeset.

mixed
getOldValue(string $field)

Gets the old value of the changeset of the changed field.

mixed
getNewValue(string $field)

Gets the new value of the changeset of the changed field.

setNewValue(string $field, mixed $value)

Sets the new value of this field.

Details

object getEntity()

Retrieves associated Entity.

Return Value

object

EntityManagerInterface getEntityManager()

Retrieves associated EntityManager.

Return Value

EntityManagerInterface

__construct($entity, EntityManagerInterface $em, array $changeSet)

Parameters

$entity
EntityManagerInterface $em
array $changeSet

mixed[] getEntityChangeSet()

Retrieves entity changeset.

Return Value

mixed[]

bool hasChangedField(string $field)

Checks if field has a changeset.

Parameters

string $field

Return Value

bool

mixed getOldValue(string $field)

Gets the old value of the changeset of the changed field.

Parameters

string $field

Return Value

mixed

mixed getNewValue(string $field)

Gets the new value of the changeset of the changed field.

Parameters

string $field

Return Value

mixed

setNewValue(string $field, mixed $value)

Sets the new value of this field.

Parameters

string $field
mixed $value