Documentation

onAfterDeleteFile

Event is called in the method \Bitrix\Disk\File::delete after deleting a file.

Event parameters

Parameter Description
$fileId Deleted file ID.
$deletedBy User ID who performed the deletion.

Example

$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('disk', 'onAfterDeleteFile', function (\Bitrix\Main\Event $event)
{
    list($fileId, $deletedBy) = $event->getParameters();

    var_dump("User with id {$deletedBy} deleted file with id {$fileId}");
});


© «Bitrix24», 2001-2024
Up