This event is emitted just before a model is saved to the data provider.

 Methods

Create a new model aware event.

__construct(\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface|null $originalModel) 

Parameters

$model

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model attached to the event.

$originalModel

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterfacenull

The original state of the model (persistent in the data provider).

Return the original state of the model.

getOriginalModel() : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface | null
May be null on create.

Returns

 Properties

 

The original model attached to the event.

$originalModel : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface | null

 Constants

 

NAME

NAME