OnSave Hook

Overview

Event fired before entity is saved (created or updated).

Common Attributes

name

type

required

default value

description

class

string

yes

none

Name of the class defining hook.

method

string

yes

none

Name of the method defining hook.

Example

<onSave class="com.sample.SampleHook" method="updateModifiedAt" />

Hook method signature

public void hookName(final DataDefinition dataDefinition, final Entity entity) {
    // ...
}