Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
Options | |
0.00% |
0 / 10 |
|
0.00% |
0 / 4 |
42 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
12 | |||
getSearchAction | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAdvancedSearchAction | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
supportsCart | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * LibGuides aspect of the Search Multi-class (Options) |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2011. |
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_LibGuides |
25 | * @author Demian Katz <demian.katz@villanova.edu> |
26 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
27 | * @link https://vufind.org Main Page |
28 | */ |
29 | |
30 | namespace VuFind\Search\LibGuides; |
31 | |
32 | /** |
33 | * LibGuides Search Options |
34 | * |
35 | * @category VuFind |
36 | * @package Search_LibGuides |
37 | * @author Demian Katz <demian.katz@villanova.edu> |
38 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
39 | * @link https://vufind.org Main Page |
40 | */ |
41 | class Options extends \VuFind\Search\Base\Options |
42 | { |
43 | use \VuFind\Config\Feature\ExplodeSettingTrait; |
44 | |
45 | /** |
46 | * Name of .ini file to use for LibGuides API and display settings. |
47 | * |
48 | * @var string |
49 | */ |
50 | protected string $iniName = 'LibGuides'; |
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->searchIni = $this->facetsIni = $this->iniName; |
60 | parent::__construct($configLoader); |
61 | $searchSettings = $configLoader->get($this->searchIni); |
62 | if (isset($searchSettings->General->default_limit)) { |
63 | $this->defaultLimit = $searchSettings->General->default_limit; |
64 | } |
65 | if (isset($searchSettings->General->limit_options)) { |
66 | $this->limitOptions = $this->explodeListSetting($searchSettings->General->limit_options); |
67 | } |
68 | } |
69 | |
70 | /** |
71 | * Return the route name for the search results action. |
72 | * |
73 | * @return string |
74 | */ |
75 | public function getSearchAction() |
76 | { |
77 | return 'libguides-results'; |
78 | } |
79 | |
80 | /** |
81 | * Return the route name of the action used for performing advanced searches. |
82 | * Returns false if the feature is not supported. |
83 | * |
84 | * @return string|bool |
85 | */ |
86 | public function getAdvancedSearchAction() |
87 | { |
88 | // Not currently supported: |
89 | return false; |
90 | } |
91 | |
92 | /** |
93 | * Does this search option support the cart/book bag? |
94 | * |
95 | * @return bool |
96 | */ |
97 | public function supportsCart() |
98 | { |
99 | // Not currently supported |
100 | return false; |
101 | } |
102 | } |