CalendarCreatedEvent.php 840 B

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