public function onAfterDeleteMedia(string $id, string $path, JModel $model) : void

Fires after deleting a media file.


Description

Trigger hook to allow the plugins to make something after deleting one or more media files. Unlike the onBeforeDeleteMedia hook, this one fires once for each deleted media file.


Parameters

$id

(string)  The name of the deleted media file. Occasionally, this argument may contain the full path.

$path

(string)  An optional path from which the file has been deleted. If not specified, the default media folder was used.

$model

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

Return Value

None.


Example

/**
 * Trigger event to allow the plugins to make something after
 * deleting a media file.
 *
 * @param   mixed   $id      The file identifier.
 * @param   mixed   $path    An optional path from which the file should has been deleted.
 * @param   JModel  $model   The model instance.
 *
 * @return  void
 */
public function onAfterDeleteMedia($id, $path, $model)
{
    /**
     * @todo do something after deleting the media file
     */
}

Changelog

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