Commit | Line | Data |
---|---|---|
6a488035 | 1 | <?php |
6a488035 TO |
2 | /* |
3 | +--------------------------------------------------------------------+ | |
39de6fd5 | 4 | | CiviCRM version 4.6 | |
6a488035 | 5 | +--------------------------------------------------------------------+ |
06b69b18 | 6 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
d25dd0ee | 26 | */ |
6a488035 TO |
27 | |
28 | /** | |
29 | * This class introduces component to the system and provides all the | |
30 | * information about it. It needs to extend CRM_Core_Component_Info | |
31 | * abstract class. | |
32 | * | |
33 | * @package CRM | |
06b69b18 | 34 | * @copyright CiviCRM LLC (c) 2004-2014 |
6a488035 TO |
35 | * $Id$ |
36 | * | |
37 | */ | |
38 | class CRM_Report_Info extends CRM_Core_Component_Info { | |
39 | ||
e7c15cb6 CW |
40 | /** |
41 | * @inheritDoc | |
42 | */ | |
6a488035 TO |
43 | protected $keyword = 'report'; |
44 | ||
74cf4551 | 45 | /** |
e7c15cb6 | 46 | * @inheritDoc |
74cf4551 EM |
47 | * Provides base information about the component. |
48 | * Needs to be implemented in component's information | |
49 | * class. | |
50 | * | |
a6c01b45 CW |
51 | * @return array |
52 | * collection of required component settings | |
74cf4551 EM |
53 | */ |
54 | /** | |
55 | * @return array | |
56 | */ | |
6a488035 TO |
57 | public function getInfo() { |
58 | return array( | |
59 | 'name' => 'CiviReport', | |
60 | 'translatedName' => ts('CiviReport'), | |
61 | 'title' => 'CiviCRM Report Engine', | |
62 | 'search' => 0, | |
63 | 'showActivitiesInCore' => 1, | |
64 | ); | |
65 | } | |
66 | ||
67 | ||
74cf4551 | 68 | /** |
e7c15cb6 | 69 | * @inheritDoc |
74cf4551 EM |
70 | * Provides permissions that are used by component. |
71 | * Needs to be implemented in component's information | |
72 | * class. | |
73 | * | |
74 | * NOTE: if using conditionally permission return, | |
75 | * implementation of $getAllUnconditionally is required. | |
76 | * | |
77 | * @param bool $getAllUnconditionally | |
78 | * | |
72b3a70c CW |
79 | * @return array|null |
80 | * collection of permissions, null if none | |
74cf4551 EM |
81 | */ |
82 | /** | |
83 | * @param bool $getAllUnconditionally | |
84 | * | |
85 | * @return array|null | |
86 | */ | |
33777e4a | 87 | public function getPermissions($getAllUnconditionally = FALSE) { |
6a488035 TO |
88 | return array('access CiviReport', 'access Report Criteria', 'administer reserved reports', 'administer Reports'); |
89 | } | |
90 | ||
91 | ||
74cf4551 | 92 | /** |
e7c15cb6 | 93 | * @inheritDoc |
74cf4551 EM |
94 | * Provides information about user dashboard element |
95 | * offered by this component. | |
96 | * | |
72b3a70c CW |
97 | * @return array|null |
98 | * collection of required dashboard settings, | |
74cf4551 | 99 | * null if no element offered |
74cf4551 EM |
100 | */ |
101 | /** | |
102 | * @return array|null | |
103 | */ | |
6a488035 TO |
104 | public function getUserDashboardElement() { |
105 | // no dashboard element for this component | |
106 | return NULL; | |
107 | } | |
108 | ||
74cf4551 EM |
109 | /** |
110 | * Provides component's user dashboard page object. | |
111 | * | |
72b3a70c CW |
112 | * @return mixed |
113 | * component's User Dashboard applet object | |
74cf4551 EM |
114 | */ |
115 | /** | |
116 | * @return mixed | |
117 | */ | |
6a488035 TO |
118 | public function getUserDashboardObject() { |
119 | // no dashboard element for this component | |
120 | return NULL; | |
121 | } | |
122 | ||
74cf4551 | 123 | /** |
e7c15cb6 | 124 | * @inheritDoc |
74cf4551 EM |
125 | * Provides information about user dashboard element |
126 | * offered by this component. | |
127 | * | |
72b3a70c CW |
128 | * @return array|null |
129 | * collection of required dashboard settings, | |
74cf4551 | 130 | * null if no element offered |
74cf4551 EM |
131 | */ |
132 | /** | |
133 | * @return array|null | |
134 | */ | |
6a488035 TO |
135 | public function registerTab() { |
136 | // this component doesn't use contact record tabs | |
137 | return NULL; | |
138 | } | |
139 | ||
74cf4551 | 140 | /** |
e7c15cb6 | 141 | * @inheritDoc |
74cf4551 EM |
142 | * Provides information about advanced search pane |
143 | * offered by this component. | |
144 | * | |
72b3a70c CW |
145 | * @return array|null |
146 | * collection of required pane settings, | |
74cf4551 | 147 | * null if no element offered |
74cf4551 EM |
148 | */ |
149 | /** | |
150 | * @return array|null | |
151 | */ | |
6a488035 TO |
152 | public function registerAdvancedSearchPane() { |
153 | // this component doesn't use advanced search | |
154 | return NULL; | |
155 | } | |
156 | ||
74cf4551 | 157 | /** |
e7c15cb6 | 158 | * @inheritDoc |
74cf4551 EM |
159 | * Provides potential activity types that this |
160 | * component might want to register in activity history. | |
161 | * Needs to be implemented in component's information | |
162 | * class. | |
163 | * | |
72b3a70c CW |
164 | * @return array|null |
165 | * collection of activity types | |
74cf4551 EM |
166 | */ |
167 | /** | |
168 | * @return array|null | |
169 | */ | |
6a488035 TO |
170 | public function getActivityTypes() { |
171 | return NULL; | |
172 | } | |
173 | ||
74cf4551 | 174 | /** |
fe482240 | 175 | * add shortcut to Create New. |
74cf4551 EM |
176 | * @param $shortCuts |
177 | */ | |
84178120 TO |
178 | public function creatNewShortcut(&$shortCuts) { |
179 | } | |
96025800 | 180 | |
6a488035 | 181 | } |