aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorMichael Große <grosse@cosmocode.de>2018-03-27 20:34:49 +0200
committerMichael Große <grosse@cosmocode.de>2018-03-27 20:34:49 +0200
commitbe76738b2e922fdef783c19c00c675e61174e143 (patch)
tree527c9421b0fff313081c3553cc5082311b225f45 /inc
parent7fa270bc10b622a41cd4931fd81eb6c43f3e0db4 (diff)
downloaddokuwiki-be76738b2e922fdef783c19c00c675e61174e143.tar.gz
dokuwiki-be76738b2e922fdef783c19c00c675e61174e143.zip
doc(search): add missing PHP doc blocks
Diffstat (limited to 'inc')
-rw-r--r--inc/Ui/Search.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/inc/Ui/Search.php b/inc/Ui/Search.php
index 0db71d0a6..855de63e0 100644
--- a/inc/Ui/Search.php
+++ b/inc/Ui/Search.php
@@ -91,6 +91,11 @@ class Search extends Ui
return $searchForm->toHTML();
}
+ /**
+ * Add elements to adjust how the results are sorted
+ *
+ * @param Form $searchForm
+ */
protected function addSortTool(Form $searchForm)
{
global $INPUT, $lang;
@@ -141,6 +146,13 @@ class Search extends Ui
}
+ /**
+ * Check if the query is simple enough to modify its namespace limitations without breaking the rest of the query
+ *
+ * @param array $parsedQuery
+ *
+ * @return bool
+ */
protected function isNamespaceAssistanceAvailable(array $parsedQuery) {
if (preg_match('/[\(\)\|]/', $parsedQuery['query']) === 1) {
return false;
@@ -149,6 +161,13 @@ class Search extends Ui
return true;
}
+ /**
+ * Check if the query is simple enough to modify the fragment search behavior without breaking the rest of the query
+ *
+ * @param array $parsedQuery
+ *
+ * @return bool
+ */
protected function isFragmentAssistanceAvailable(array $parsedQuery) {
if (preg_match('/[\(\)\|]/', $parsedQuery['query']) === 1) {
return false;
@@ -185,6 +204,11 @@ class Search extends Ui
$searchForm->addTagClose('div');
}
+ /**
+ * Add the elements to adjust the fragment search behavior
+ *
+ * @param Form $searchForm
+ */
protected function addFragmentBehaviorLinks(Form $searchForm)
{
if (!$this->isFragmentAssistanceAvailable($this->parsedQuery)) {