BeforeNodeDeletedEvent.php 563 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Files\Events\Node;
  8. use OCP\Exceptions\AbortedEventException;
  9. /**
  10. * @since 20.0.0
  11. */
  12. class BeforeNodeDeletedEvent extends AbstractNodeEvent {
  13. /**
  14. * @since 28.0.0
  15. * @deprecated 29.0.0 - use OCP\Exceptions\AbortedEventException instead
  16. */
  17. public function abortOperation(?\Throwable $ex = null) {
  18. throw new AbortedEventException($ex?->getMessage() ?? 'Operation aborted');
  19. }
  20. }