class PreUpdateEventArgs extends LifecycleEventArgs (View source)

Class that holds event arguments for a preUpdate event.

Methods

object
getDocument()

Retrieves the associated document.

getDocumentManager()

Retrieves the associated DocumentManager.

__construct(object $document, DocumentManager $dm, array $changeSet)

Constructor.

array
getDocumentChangeSet()

Retrieves the document 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.

setNewValue(string $field, mixed $value)

Sets the new value of this field.

Details

object getDocument()

Retrieves the associated document.

Return Value

object

DocumentManager getDocumentManager()

Retrieves the associated DocumentManager.

Return Value

DocumentManager

__construct(object $document, DocumentManager $dm, array $changeSet)

Constructor.

Parameters

object $document
DocumentManager $dm
array $changeSet

array getDocumentChangeSet()

Retrieves the document 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

setNewValue(string $field, mixed $value)

Sets the new value of this field.

Parameters

string $field
mixed $value