Merge branch 4.5 into master
[civicrm-core.git] / CRM / Report / Info.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2014 |
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
34 * @copyright CiviCRM LLC (c) 2004-2014
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
44 /**
45 * Provides base information about the component.
46 * Needs to be implemented in component's information
47 * class.
48 *
49 * @return array
50 * collection of required component settings
51 */
52 /**
53 * @return array
54 */
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
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
78 */
79 /**
80 * @param bool $getAllUnconditionally
81 *
82 * @return array|null
83 */
84 public function getPermissions($getAllUnconditionally = FALSE) {
85 return array('access CiviReport', 'access Report Criteria', 'administer reserved reports', 'administer Reports');
86 }
87
88
89 // docs inherited from interface
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
96 */
97 /**
98 * @return array|null
99 */
100 public function getUserDashboardElement() {
101 // no dashboard element for this component
102 return NULL;
103 }
104
105 /**
106 * Provides component's user dashboard page object.
107 *
108 * @return mixed component's User Dashboard applet object
109 */
110 /**
111 * @return mixed
112 */
113 public function getUserDashboardObject() {
114 // no dashboard element for this component
115 return NULL;
116 }
117
118 // docs inherited from interface
119 /**
120 * Provides information about user dashboard element
121 * offered by this component.
122 *
123 * @return array|null collection of required dashboard settings,
124 * null if no element offered
125 */
126 /**
127 * @return array|null
128 */
129 public function registerTab() {
130 // this component doesn't use contact record tabs
131 return NULL;
132 }
133
134 // docs inherited from interface
135 /**
136 * Provides information about advanced search pane
137 * offered by this component.
138 *
139 * @return array|null collection of required pane settings,
140 * null if no element offered
141 */
142 /**
143 * @return array|null
144 */
145 public function registerAdvancedSearchPane() {
146 // this component doesn't use advanced search
147 return NULL;
148 }
149
150 // docs inherited from interface
151 /**
152 * Provides potential activity types that this
153 * component might want to register in activity history.
154 * Needs to be implemented in component's information
155 * class.
156 *
157 * @return array|null collection of activity types
158 */
159 /**
160 * @return array|null
161 */
162 public function getActivityTypes() {
163 return NULL;
164 }
165
166 // add shortcut to Create New
167 /**
168 * @param $shortCuts
169 */
170 public function creatNewShortcut(&$shortCuts) {
171 }
172 }