Methods
# onChange(callback)
The field.onChange() function is called when another extension programmatically changes the data of the current extension field using the field.setData() function. This function is only available for extension fields that support the following data types: text, number, boolean, or date.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function
|
The function to be called when an asset is edited/changed. |
# onPublish(callback)
The onPublish() function executes the callback function every time an asset has been published with the respective payload.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function
|
The function to be called when an asset is published. |
# onSave(callback)
This function executes the callback function every time an asset is saved.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function
|
The function to be called when an asset is saved. |
# onUnPublish(callback)
The onUnPublish() function executes the callback function every time an asset has been unpublished with the respective payload.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function
|
The function to be called when an asset is un published. |