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(object $entity, EntityManager $em, array $changeSet)

Constructor.

array
getEntityChangeSet()

Retrieves entity changeset.

boolean
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.

void
setNewValue(string $field, mixed $value)

Sets the new value of this field.

Details

object getEntity()

Retrieves associated Entity.

Return Value

object

EntityManager getEntityManager()

Retrieves associated EntityManager.

Return Value

EntityManager

__construct(object $entity, EntityManager $em, array $changeSet)

Constructor.

Parameters

object $entity
EntityManager $em
array $changeSet

array getEntityChangeSet()

Retrieves entity changeset.

Return Value

array

boolean hasChangedField(string $field)

Checks if field has a changeset.

Parameters

string $field

Return Value

boolean

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

void setNewValue(string $field, mixed $value)

Sets the new value of this field.

Parameters

string $field
mixed $value

Return Value

void