public function onAfterSaveMedia(array $data, JModel $model) : bool

Fires after saving/uploading a media file.


Description

This hook is triggered after creating or updating a record. External plugins can use this hook to perform further actions after saving a record.


Parameters

$data

(array)  The properties of the media that have been saved.

$model

(JModel)  The model instance that handles the saving process.

Return Value

None.


Example

/**
 * Trigger event to allow the plugins to make something after
 * saving a media file.
 *
 * @param   mixed    $data   The saved record.
 * @param   JModel   $model  The model instance.
 *
 * @return  void
 */
public function onAfterSaveMedia($data, $model)
{
    /**
     * @todo do something after saving/uploading the media file
     */
}

Changelog

VersionDescription
1.7 Introduced.
Last Update: 2021-10-08 13:28
Helpful?
See Also:
This site uses cookies. By continuing to browse you accept their use. Further information