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 | +--------------------------------------------------------------------+ | |
26 | */ | |
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 | ||
40 | // docs inherited from interface | |
41 | protected $keyword = 'report'; | |
42 | ||
74cf4551 | 43 | /** |
4f1f1f2a | 44 | * docs inherited from interface |
74cf4551 EM |
45 | * Provides base information about the component. |
46 | * Needs to be implemented in component's information | |
47 | * class. | |
48 | * | |
a6c01b45 CW |
49 | * @return array |
50 | * collection of required component settings | |
74cf4551 EM |
51 | */ |
52 | /** | |
53 | * @return array | |
54 | */ | |
6a488035 TO |
55 | public function getInfo() { |
56 | return array( | |
57 | 'name' => 'CiviReport', | |
58 | 'translatedName' => ts('CiviReport'), | |
59 | 'title' => 'CiviCRM Report Engine', | |
60 | 'search' => 0, | |
61 | 'showActivitiesInCore' => 1, | |
62 | ); | |
63 | } | |
64 | ||
65 | ||
74cf4551 | 66 | /** |
4f1f1f2a | 67 | * docs inherited from interface |
74cf4551 EM |
68 | * Provides permissions that are used by component. |
69 | * Needs to be implemented in component's information | |
70 | * class. | |
71 | * | |
72 | * NOTE: if using conditionally permission return, | |
73 | * implementation of $getAllUnconditionally is required. | |
74 | * | |
75 | * @param bool $getAllUnconditionally | |
76 | * | |
72b3a70c CW |
77 | * @return array|null |
78 | * collection of permissions, null if none | |
74cf4551 EM |
79 | */ |
80 | /** | |
81 | * @param bool $getAllUnconditionally | |
82 | * | |
83 | * @return array|null | |
84 | */ | |
33777e4a | 85 | public function getPermissions($getAllUnconditionally = FALSE) { |
6a488035 TO |
86 | return array('access CiviReport', 'access Report Criteria', 'administer reserved reports', 'administer Reports'); |
87 | } | |
88 | ||
89 | ||
74cf4551 | 90 | /** |
4f1f1f2a | 91 | * docs inherited from interface |
74cf4551 EM |
92 | * Provides information about user dashboard element |
93 | * offered by this component. | |
94 | * | |
72b3a70c CW |
95 | * @return array|null |
96 | * collection of required dashboard settings, | |
74cf4551 | 97 | * null if no element offered |
74cf4551 EM |
98 | */ |
99 | /** | |
100 | * @return array|null | |
101 | */ | |
6a488035 TO |
102 | public function getUserDashboardElement() { |
103 | // no dashboard element for this component | |
104 | return NULL; | |
105 | } | |
106 | ||
74cf4551 EM |
107 | /** |
108 | * Provides component's user dashboard page object. | |
109 | * | |
72b3a70c CW |
110 | * @return mixed |
111 | * component's User Dashboard applet object | |
74cf4551 EM |
112 | */ |
113 | /** | |
114 | * @return mixed | |
115 | */ | |
6a488035 TO |
116 | public function getUserDashboardObject() { |
117 | // no dashboard element for this component | |
118 | return NULL; | |
119 | } | |
120 | ||
74cf4551 | 121 | /** |
4f1f1f2a | 122 | * docs inherited from interface |
74cf4551 EM |
123 | * Provides information about user dashboard element |
124 | * offered by this component. | |
125 | * | |
72b3a70c CW |
126 | * @return array|null |
127 | * collection of required dashboard settings, | |
74cf4551 | 128 | * null if no element offered |
74cf4551 EM |
129 | */ |
130 | /** | |
131 | * @return array|null | |
132 | */ | |
6a488035 TO |
133 | public function registerTab() { |
134 | // this component doesn't use contact record tabs | |
135 | return NULL; | |
136 | } | |
137 | ||
74cf4551 | 138 | /** |
4f1f1f2a | 139 | * docs inherited from interface |
74cf4551 EM |
140 | * Provides information about advanced search pane |
141 | * offered by this component. | |
142 | * | |
72b3a70c CW |
143 | * @return array|null |
144 | * collection of required pane settings, | |
74cf4551 | 145 | * null if no element offered |
74cf4551 EM |
146 | */ |
147 | /** | |
148 | * @return array|null | |
149 | */ | |
6a488035 TO |
150 | public function registerAdvancedSearchPane() { |
151 | // this component doesn't use advanced search | |
152 | return NULL; | |
153 | } | |
154 | ||
74cf4551 | 155 | /** |
4f1f1f2a | 156 | * docs inherited from interface |
74cf4551 EM |
157 | * Provides potential activity types that this |
158 | * component might want to register in activity history. | |
159 | * Needs to be implemented in component's information | |
160 | * class. | |
161 | * | |
72b3a70c CW |
162 | * @return array|null |
163 | * collection of activity types | |
74cf4551 EM |
164 | */ |
165 | /** | |
166 | * @return array|null | |
167 | */ | |
6a488035 TO |
168 | public function getActivityTypes() { |
169 | return NULL; | |
170 | } | |
171 | ||
74cf4551 | 172 | /** |
4f1f1f2a | 173 | * add shortcut to Create New |
74cf4551 EM |
174 | * @param $shortCuts |
175 | */ | |
84178120 TO |
176 | public function creatNewShortcut(&$shortCuts) { |
177 | } | |
6a488035 | 178 | } |