mirror of
https://github.com/nextcloud/server.git
synced 2026-11-30 20:18:46 +01:00
- Remove the reference to the non-existent BeforeAllNodeDeletedEvent and fix the descriptions of the trash bin deletion events. - Add a test that Trashbin::delete returns the size of deleted files and folders, now that it relies on Node::getSize. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
31 lines
559 B
PHP
31 lines
559 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Files_Trashbin\Events;
|
|
|
|
use OCP\EventDispatcher\Event;
|
|
use OCP\Files\Node;
|
|
|
|
/**
|
|
* Event sent before a node is permanently deleted from the trash bin.
|
|
*
|
|
* @since 35.0.0
|
|
*/
|
|
class BeforeNodeDeletedEvent extends Event {
|
|
public function __construct(
|
|
private readonly Node $source,
|
|
) {
|
|
parent::__construct();
|
|
}
|
|
|
|
public function getSource(): Node {
|
|
return $this->source;
|
|
}
|
|
}
|