2019-02-26 08:16:59 -05:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-02-26 08:16:59 -05:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-02-26 08:16:59 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-02-26 08:16:59 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\Collaboration\AutoComplete;
|
|
|
|
|
|
2020-06-16 15:14:42 -04:00
|
|
|
use OCP\EventDispatcher\GenericEvent;
|
2019-02-26 08:16:59 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
2023-10-31 10:07:02 -04:00
|
|
|
* @deprecated Use {@see AutoCompleteFilterEvent} instead
|
2019-02-26 08:16:59 -05:00
|
|
|
*/
|
|
|
|
|
class AutoCompleteEvent extends GenericEvent {
|
|
|
|
|
/**
|
|
|
|
|
* @param array $arguments
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(array $arguments) {
|
|
|
|
|
parent::__construct(null, $arguments);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getResults(): array {
|
|
|
|
|
return $this->getArgument('results');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param array $results
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function setResults(array $results): void {
|
|
|
|
|
$this->setArgument('results', $results);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getSearchTerm(): string {
|
|
|
|
|
return $this->getArgument('search');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int[]
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getShareTypes(): array {
|
|
|
|
|
return $this->getArgument('shareTypes');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getItemType(): string {
|
|
|
|
|
return $this->getArgument('itemType');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getItemId(): string {
|
|
|
|
|
return $this->getArgument('itemId');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getSorter(): string {
|
|
|
|
|
return $this->getArgument('sorter');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 16.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getLimit(): int {
|
|
|
|
|
return $this->getArgument('limit');
|
|
|
|
|
}
|
|
|
|
|
}
|