3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
29 * This class introduces component to the system and provides all the
30 * information about it. It needs to extend CRM_Core_Component_Info
33 * @copyright CiviCRM LLC (c) 2004-2017
37 class CRM_Report_Info
extends CRM_Core_Component_Info
{
42 protected $keyword = 'report';
46 * Provides base information about the component.
47 * Needs to be implemented in component's information
51 * collection of required component settings
53 public function getInfo() {
55 'name' => 'CiviReport',
56 'translatedName' => ts('CiviReport'),
57 'title' => ts('CiviCRM Report Engine'),
59 'showActivitiesInCore' => 1,
66 * Provides permissions that are used by component.
67 * Needs to be implemented in component's information
70 * NOTE: if using conditionally permission return,
71 * implementation of $getAllUnconditionally is required.
73 * @param bool $getAllUnconditionally
74 * @param bool $descriptions
75 * Whether to return permission descriptions
78 * collection of permissions, null if none
80 public function getPermissions($getAllUnconditionally = FALSE, $descriptions = FALSE) {
82 'access CiviReport' => array(
83 ts('access CiviReport'),
86 'access Report Criteria' => array(
87 ts('access Report Criteria'),
88 ts('Change report search criteria'),
90 'administer private reports' => array(
91 ts('administer private reports'),
92 ts('Edit all private reports'),
94 'administer reserved reports' => array(
95 ts('administer reserved reports'),
96 ts('Edit all reports that have been marked as reserved'),
98 'administer Reports' => array(
99 ts('administer Reports'),
100 ts('Manage report templates'),
102 'view report sql' => array(
103 ts('view report sql'),
104 ts('View sql used in CiviReports'),
108 if (!$descriptions) {
109 foreach ($permissions as $name => $attr) {
110 $permissions[$name] = array_shift($attr);
120 * Provides information about user dashboard element
121 * offered by this component.
124 * collection of required dashboard settings,
125 * null if no element offered
127 public function getUserDashboardElement() {
128 // no dashboard element for this component
133 * Provides component's user dashboard page object.
136 * component's User Dashboard applet object
141 public function getUserDashboardObject() {
142 // no dashboard element for this component
148 * Provides information about user dashboard element
149 * offered by this component.
152 * collection of required dashboard settings,
153 * null if no element offered
158 public function registerTab() {
159 // this component doesn't use contact record tabs
165 * Provides information about advanced search pane
166 * offered by this component.
169 * collection of required pane settings,
170 * null if no element offered
175 public function registerAdvancedSearchPane() {
176 // this component doesn't use advanced search
182 * Provides potential activity types that this
183 * component might want to register in activity history.
184 * Needs to be implemented in component's information
188 * collection of activity types
193 public function getActivityTypes() {
198 * add shortcut to Create New.
201 public function creatNewShortcut(&$shortCuts) {