ISorter.php 705 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Collaboration\AutoComplete;
  7. /**
  8. * Interface ISorter
  9. *
  10. * Sorts the list of .e.g users for auto completion
  11. *
  12. * @since 13.0.0
  13. */
  14. interface ISorter {
  15. /**
  16. * @return string The ID of the sorter, e.g. commenters
  17. * @since 13.0.0
  18. */
  19. public function getId();
  20. /**
  21. * executes the sort action
  22. *
  23. * @param array $sortArray the array to be sorted, provided as reference
  24. * @param array $context carries key 'itemType' and 'itemId' of the source object (e.g. a file)
  25. * @since 13.0.0
  26. */
  27. public function sort(array &$sortArray, array $context);
  28. }