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 | ||
43 | // docs inherited from interface | |
74cf4551 EM |
44 | /** |
45 | * Provides base information about the component. | |
46 | * Needs to be implemented in component's information | |
47 | * class. | |
48 | * | |
49 | * @return array collection of required component settings | |
74cf4551 EM |
50 | * |
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 | ||
66 | // docs inherited from interface | |
74cf4551 EM |
67 | /** |
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 | * | |
77 | * @return array|null collection of permissions, null if none | |
74cf4551 EM |
78 | */ |
79 | /** | |
80 | * @param bool $getAllUnconditionally | |
81 | * | |
82 | * @return array|null | |
83 | */ | |
33777e4a | 84 | public function getPermissions($getAllUnconditionally = FALSE) { |
6a488035 TO |
85 | return array('access CiviReport', 'access Report Criteria', 'administer reserved reports', 'administer Reports'); |
86 | } | |
87 | ||
88 | ||
89 | // docs inherited from interface | |
74cf4551 EM |
90 | /** |
91 | * Provides information about user dashboard element | |
92 | * offered by this component. | |
93 | * | |
94 | * @return array|null collection of required dashboard settings, | |
95 | * null if no element offered | |
74cf4551 EM |
96 | * |
97 | */ | |
98 | /** | |
99 | * @return array|null | |
100 | */ | |
6a488035 TO |
101 | public function getUserDashboardElement() { |
102 | // no dashboard element for this component | |
103 | return NULL; | |
104 | } | |
105 | ||
74cf4551 EM |
106 | /** |
107 | * Provides component's user dashboard page object. | |
108 | * | |
109 | * @return mixed component's User Dashboard applet object | |
74cf4551 EM |
110 | * |
111 | */ | |
112 | /** | |
113 | * @return mixed | |
114 | */ | |
6a488035 TO |
115 | public function getUserDashboardObject() { |
116 | // no dashboard element for this component | |
117 | return NULL; | |
118 | } | |
119 | ||
120 | // docs inherited from interface | |
74cf4551 EM |
121 | /** |
122 | * Provides information about user dashboard element | |
123 | * offered by this component. | |
124 | * | |
125 | * @return array|null collection of required dashboard settings, | |
126 | * null if no element offered | |
74cf4551 EM |
127 | * |
128 | */ | |
129 | /** | |
130 | * @return array|null | |
131 | */ | |
6a488035 TO |
132 | public function registerTab() { |
133 | // this component doesn't use contact record tabs | |
134 | return NULL; | |
135 | } | |
136 | ||
137 | // docs inherited from interface | |
74cf4551 EM |
138 | /** |
139 | * Provides information about advanced search pane | |
140 | * offered by this component. | |
141 | * | |
142 | * @return array|null collection of required pane settings, | |
143 | * null if no element offered | |
74cf4551 EM |
144 | * |
145 | */ | |
146 | /** | |
147 | * @return array|null | |
148 | */ | |
6a488035 TO |
149 | public function registerAdvancedSearchPane() { |
150 | // this component doesn't use advanced search | |
151 | return NULL; | |
152 | } | |
153 | ||
154 | // docs inherited from interface | |
74cf4551 EM |
155 | /** |
156 | * Provides potential activity types that this | |
157 | * component might want to register in activity history. | |
158 | * Needs to be implemented in component's information | |
159 | * class. | |
160 | * | |
161 | * @return array|null collection of activity types | |
74cf4551 EM |
162 | * |
163 | */ | |
164 | /** | |
165 | * @return array|null | |
166 | */ | |
6a488035 TO |
167 | public function getActivityTypes() { |
168 | return NULL; | |
169 | } | |
170 | ||
171 | // add shortcut to Create New | |
74cf4551 EM |
172 | /** |
173 | * @param $shortCuts | |
174 | */ | |
6a488035 TO |
175 | public function creatNewShortcut(&$shortCuts) {} |
176 | } |