1
0

AutoCompleteEvent.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\Collaboration\AutoComplete;
  8. use OCP\EventDispatcher\GenericEvent;
  9. /**
  10. * @since 16.0.0
  11. * @deprecated 28.0.0 Use {@see AutoCompleteFilterEvent} instead
  12. */
  13. class AutoCompleteEvent extends GenericEvent {
  14. /**
  15. * @param array $arguments
  16. * @since 16.0.0
  17. */
  18. public function __construct(array $arguments) {
  19. parent::__construct(null, $arguments);
  20. }
  21. /**
  22. * @since 16.0.0
  23. */
  24. public function getResults(): array {
  25. return $this->getArgument('results');
  26. }
  27. /**
  28. * @param array $results
  29. * @since 16.0.0
  30. */
  31. public function setResults(array $results): void {
  32. $this->setArgument('results', $results);
  33. }
  34. /**
  35. * @since 16.0.0
  36. */
  37. public function getSearchTerm(): string {
  38. return $this->getArgument('search');
  39. }
  40. /**
  41. * @return int[]
  42. * @since 16.0.0
  43. */
  44. public function getShareTypes(): array {
  45. return $this->getArgument('shareTypes');
  46. }
  47. /**
  48. * @since 16.0.0
  49. */
  50. public function getItemType(): string {
  51. return $this->getArgument('itemType');
  52. }
  53. /**
  54. * @since 16.0.0
  55. */
  56. public function getItemId(): string {
  57. return $this->getArgument('itemId');
  58. }
  59. /**
  60. * @since 16.0.0
  61. */
  62. public function getSorter(): string {
  63. return $this->getArgument('sorter');
  64. }
  65. /**
  66. * @since 16.0.0
  67. */
  68. public function getLimit(): int {
  69. return $this->getArgument('limit');
  70. }
  71. }