BeforeGetTemplatesEvent.php 668 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Files\Template;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * @since 30.0.0
  11. */
  12. class BeforeGetTemplatesEvent extends Event {
  13. /** @var array<Template> */
  14. private array $templates;
  15. /**
  16. * @param array<Template> $templates
  17. *
  18. * @since 30.0.0
  19. */
  20. public function __construct(array $templates) {
  21. parent::__construct();
  22. $this->templates = $templates;
  23. }
  24. /**
  25. * @return array<Template>
  26. *
  27. * @since 30.0.0
  28. */
  29. public function getTemplates(): array {
  30. return $this->templates;
  31. }
  32. }