Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2019-02-26 20:11:24 +0300
committerGitHub <noreply@github.com>2019-02-26 20:11:24 +0300
commita3d936fbb7c8356a39308d836282b4ee6b2abdc1 (patch)
treece0983e0c4d59d53d8f1a07d7fdd3b6b31356deb /lib
parent0051bb7e4cd890793edac99d5b6475457c8580f3 (diff)
parent55f627d20b6eacb1773381ea4325d2159f9c3103 (diff)
Merge pull request #14385 from nextcloud/feature/noid/add-event-to-allow-to-filter-results
Add an event to the Autocomplete Controller to allow to filter the re…
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php99
3 files changed, 101 insertions, 0 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 9ac6d837449..be7702c1d41 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -104,6 +104,7 @@ return array(
'OCP\\Calendar\\Room\\IRoom' => $baseDir . '/lib/public/Calendar/Room/IRoom.php',
'OCP\\Capabilities\\ICapability' => $baseDir . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => $baseDir . '/lib/public/Capabilities/IPublicCapability.php',
+ 'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => $baseDir . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php',
'OCP\\Collaboration\\AutoComplete\\IManager' => $baseDir . '/lib/public/Collaboration/AutoComplete/IManager.php',
'OCP\\Collaboration\\AutoComplete\\ISorter' => $baseDir . '/lib/public/Collaboration/AutoComplete/ISorter.php',
'OCP\\Collaboration\\Collaborators\\ISearch' => $baseDir . '/lib/public/Collaboration/Collaborators/ISearch.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index ca5e47bb9f1..04395a3b80d 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -134,6 +134,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\Calendar\\Room\\IRoom' => __DIR__ . '/../../..' . '/lib/public/Calendar/Room/IRoom.php',
'OCP\\Capabilities\\ICapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/ICapability.php',
'OCP\\Capabilities\\IPublicCapability' => __DIR__ . '/../../..' . '/lib/public/Capabilities/IPublicCapability.php',
+ 'OCP\\Collaboration\\AutoComplete\\AutoCompleteEvent' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php',
'OCP\\Collaboration\\AutoComplete\\IManager' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/IManager.php',
'OCP\\Collaboration\\AutoComplete\\ISorter' => __DIR__ . '/../../..' . '/lib/public/Collaboration/AutoComplete/ISorter.php',
'OCP\\Collaboration\\Collaborators\\ISearch' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Collaborators/ISearch.php',
diff --git a/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
new file mode 100644
index 00000000000..59dbafcb56f
--- /dev/null
+++ b/lib/public/Collaboration/AutoComplete/AutoCompleteEvent.php
@@ -0,0 +1,99 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2019 Joas Schilling <coding@schilljs.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Collaboration\AutoComplete;
+
+
+use Symfony\Component\EventDispatcher\GenericEvent;
+
+/**
+ * @since 16.0.0
+ */
+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');
+ }
+
+}