diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/QuickSearch.class.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/classes/QuickSearch.class.php b/lib/classes/QuickSearch.class.php index 69a80f7..d3983a3 100644 --- a/lib/classes/QuickSearch.class.php +++ b/lib/classes/QuickSearch.class.php @@ -94,6 +94,7 @@ class QuickSearch private $inputClass = null; private $inputStyle = null; private $specialQuery = null; + private $minLength = 3; /** @@ -264,6 +265,20 @@ class QuickSearch } /** + * Set the minimum length to start searching + * + * @param int $minLength + * + * @return QuickSearch + */ + public function setMinLength(int $minLength) + { + $this->minLength = $minLength; + + return $this; + } + + /** * disables the select-box, which is displayed for non-JS users who will * choose with this box, which item they want to have. * @@ -384,6 +399,7 @@ class QuickSearch $template->set_attribute('count_QS', self::$count_QS); $template->set_attribute('id', $this->getId()); $template->set_attribute('query_id', $query_id); + $template->set_attribute('minLength', $this->minLength); $template->set_attribute('search_button_name', $this->search_button_name); $template->set_attribute('reset_button_name', $this->reset_button_name); $template->set_attribute('extendedLayout', $this->hasExtendedLayout()); |
