ICustomTemplateProvider.php 679 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Files\Template;
  8. use OCP\Files\File;
  9. /**
  10. * @since 21.0.0
  11. */
  12. interface ICustomTemplateProvider {
  13. /**
  14. * Return a list of additional templates that the template provider is offering
  15. *
  16. * @return File[]
  17. * @since 21.0.0
  18. */
  19. public function getCustomTemplates(string $mimetype): array;
  20. /**
  21. * Return the file for a given template id
  22. *
  23. * @param string $template identifier of the template
  24. * @return File
  25. * @since 21.0.0
  26. */
  27. public function getCustomTemplate(string $template): File;
  28. }