Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Feedback | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
tabEnabled | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * This is a helper that lets the layout know whether or not to include the feedback |
5 | * tab |
6 | * |
7 | * PHP version 8 |
8 | * |
9 | * Copyright (C) Villanova University 2010. |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License version 2, |
13 | * as published by the Free Software Foundation. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | * GNU General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU General Public License |
21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
23 | * |
24 | * @category VuFind |
25 | * @package View_Helpers |
26 | * @author Demian Katz <demian.katz@villanova.edu> |
27 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
28 | * @link https://vufind.org/wiki/development Wiki |
29 | */ |
30 | |
31 | namespace VuFind\View\Helper\Root; |
32 | |
33 | /** |
34 | * This is a helper that lets the layout know whether or not to include the feedback |
35 | * tab |
36 | * |
37 | * @category VuFind |
38 | * @package View_Helpers |
39 | * @author Josiah Knoll <jk1135@ship.edu> |
40 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
41 | * @link https://vufind.org/wiki/development Wiki |
42 | */ |
43 | class Feedback extends \Laminas\View\Helper\AbstractHelper |
44 | { |
45 | /** |
46 | * Is the tab enabled? |
47 | * |
48 | * @var bool |
49 | */ |
50 | protected $tab; |
51 | |
52 | /** |
53 | * Constructor |
54 | * |
55 | * @param bool $enabled Is the tab enabled? |
56 | */ |
57 | public function __construct($enabled = true) |
58 | { |
59 | $this->tab = $enabled; |
60 | } |
61 | |
62 | /** |
63 | * This will retrieve the config for whether or not the tab is enabled. |
64 | * |
65 | * @return bool |
66 | */ |
67 | public function tabEnabled() |
68 | { |
69 | return $this->tab; |
70 | } |
71 | } |