Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
6 / 6 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
1 / 1 |
Options | |
100.00% |
6 / 6 |
|
100.00% |
4 / 4 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
getSearchAction | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAdvancedSearchAction | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
2 | |||
getFacetListAction | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * Blender aspect of the Search Multi-class (Options) |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) The National Library of Finland 2015-2022. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2, |
12 | * as published by the Free Software Foundation. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * |
23 | * @category VuFind |
24 | * @package Search_Blender |
25 | * @author Samuli Sillanpää <samuli.sillanpaa@helsinki.fi> |
26 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
27 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
28 | * @link https://vufind.org Main Page |
29 | */ |
30 | |
31 | namespace VuFind\Search\Blender; |
32 | |
33 | /** |
34 | * Blender Search Options |
35 | * |
36 | * @category VuFind |
37 | * @package Search_Blender |
38 | * @author Samuli Sillanpää <samuli.sillanpaa@helsinki.fi> |
39 | * @author Ere Maijala <ere.maijala@helsinki.fi> |
40 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
41 | * @link https://vufind.org Main Page |
42 | */ |
43 | class Options extends \VuFind\Search\Solr\Options |
44 | { |
45 | /** |
46 | * Maximum number of results (400 by default) |
47 | * |
48 | * @var int |
49 | */ |
50 | protected $resultLimit = 400; |
51 | |
52 | /** |
53 | * Constructor |
54 | * |
55 | * @param \VuFind\Config\PluginManager $configLoader Config loader |
56 | */ |
57 | public function __construct(\VuFind\Config\PluginManager $configLoader) |
58 | { |
59 | $this->facetsIni = $this->searchIni = 'Blender'; |
60 | parent::__construct($configLoader); |
61 | // Make sure first-last navigation is never enabled since we cannot support: |
62 | $this->firstLastNavigationSupported = false; |
63 | } |
64 | |
65 | /** |
66 | * Return the route name for the search results action. |
67 | * |
68 | * @return string |
69 | */ |
70 | public function getSearchAction() |
71 | { |
72 | return 'blender-results'; |
73 | } |
74 | |
75 | /** |
76 | * Return the route name of the action used for performing advanced searches. |
77 | * Returns false if the feature is not supported. |
78 | * |
79 | * @return string|bool |
80 | */ |
81 | public function getAdvancedSearchAction() |
82 | { |
83 | return $this->advancedHandlers ? 'blender-advanced' : false; |
84 | } |
85 | |
86 | /** |
87 | * Return the route name for the facet list action. Returns false to cover |
88 | * unimplemented support. |
89 | * |
90 | * @return string|bool |
91 | */ |
92 | public function getFacetListAction() |
93 | { |
94 | return false; |
95 | } |
96 | } |