CalendarUnpublishedEvent.php 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 OCA\DAV\Events;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * Class CalendarPublishedEvent
  11. *
  12. * @package OCA\DAV\Events
  13. * @since 20.0.0
  14. */
  15. class CalendarUnpublishedEvent extends Event {
  16. private int $calendarId;
  17. private array $calendarData;
  18. /**
  19. * CalendarUnpublishedEvent constructor.
  20. *
  21. * @param int $calendarId
  22. * @param array $calendarData
  23. * @since 20.0.0
  24. */
  25. public function __construct(int $calendarId,
  26. array $calendarData) {
  27. parent::__construct();
  28. $this->calendarId = $calendarId;
  29. $this->calendarData = $calendarData;
  30. }
  31. /**
  32. * @return int
  33. * @since 20.0.0
  34. */
  35. public function getCalendarId(): int {
  36. return $this->calendarId;
  37. }
  38. /**
  39. * @return array
  40. * @since 20.0.0
  41. */
  42. public function getCalendarData(): array {
  43. return $this->calendarData;
  44. }
  45. }