Events in this section apply to file management operations.
The following events apply to file management. Each of these events relate to a single file.
filecreated.module_assets
. Triggered when a new file is created.
filemodified.module_assets
. Triggered when an existing file is
updated.
filedeleted.module_assets
. Triggered when an existing file is
deleted.
fileextracted.module_assets
. Triggered when an archive (such as a
zip file) is extracted.
filerestored.module_assets
. Triggered when a file is restored to an
older version.
The following data is included with each of these events.
id
. Internal ID of the file.
folder_id
. Folder ID of the file.
filename
. Current filename of the file.
In addition, the following event is also triggered:
fileselected.module_assets
. Triggered when a file is selected in the
Control Panel.
id
. The ID of the file that was selected.
The following events apply to folder management. Each of these events relate to a single folder.
foldercreated.module_assets
. Triggered when a new folder is created.
foldermodified.module_assets
. Triggered when an existing folder is
updated.
folderdeleted.module_assets
. Triggered when an existing folder is
deleted.
The following data is included with each of these events.
id
. Internal ID of the folder.
parent_id
. Folder ID of the folder's parent folder.
name
. Current name of the folder.
In addition, the following event is also triggered:
folderselected.module_assets
. Triggered when a folder is selected in the
Control Panel.
id
. The ID of the folder that was selected.
The following events are sent back when bulk operations occur.
filebulkmoved.module_assets
. Triggered when files are bulk moved.
folder_ids
. An array of folder IDs that were affected by
the move.
filebulkdeleted.module_assets
. Triggered when one or more files are
bulk deleted.
file
. This is an array where each entry corresponds to a
moved file. This element contains id
, name
and
folder_id
values.
folderbulkdeleted.module_assets
. Triggered when one or more folders
are bulk deleted.
folder
. This is an array where each entry corresponds to a
moved folder. This element contains id
, name
and parent_id
values.
bulkdeleted.module_assets
. Triggered when files and/or folders are
bulk deleted. This will be triggered with at least one of the previous two
events.
count
. The total number of files/folders deleted.
The following events relate to linking files to other content.
linkedfilesupdated.module_assets
. Triggered when some content has
its linked files updated.
driver
. The name of the connector linking the file(s) to
the content.
linked_id
. The internal ID of the linked item.
title
. A descriptive title for the linked item.