3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * This class introduces component to the system and provides all the
14 * information about it. It needs to extend CRM_Core_Component_Info
17 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 class CRM_Report_Info
extends CRM_Core_Component_Info
{
27 protected $keyword = 'report';
31 * Provides base information about the component.
32 * Needs to be implemented in component's information
36 * collection of required component settings
38 public function getInfo() {
40 'name' => 'CiviReport',
41 'translatedName' => ts('CiviReport'),
42 'title' => ts('CiviCRM Report Engine'),
44 'showActivitiesInCore' => 1,
50 * Provides permissions that are used by component.
51 * Needs to be implemented in component's information
54 * NOTE: if using conditionally permission return,
55 * implementation of $getAllUnconditionally is required.
57 * @param bool $getAllUnconditionally
58 * @param bool $descriptions
59 * Whether to return permission descriptions
62 * collection of permissions, null if none
64 public function getPermissions($getAllUnconditionally = FALSE, $descriptions = FALSE) {
66 'access CiviReport' => [
67 ts('access CiviReport'),
70 'access Report Criteria' => [
71 ts('access Report Criteria'),
72 ts('Change report search criteria'),
74 'save Report Criteria' => [
75 ts('save Report Criteria'),
76 ts('Save report search criteria'),
78 'administer private reports' => [
79 ts('administer private reports'),
80 ts('Edit all private reports'),
82 'administer reserved reports' => [
83 ts('administer reserved reports'),
84 ts('Edit all reports that have been marked as reserved'),
86 'administer Reports' => [
87 ts('administer Reports'),
88 ts('Manage report templates'),
90 'view report sql' => [
91 ts('view report sql'),
92 ts('View sql used in CiviReports'),
97 foreach ($permissions as $name => $attr) {
98 $permissions[$name] = array_shift($attr);
107 * Provides information about user dashboard element
108 * offered by this component.
111 * collection of required dashboard settings,
112 * null if no element offered
114 public function getUserDashboardElement() {
115 // no dashboard element for this component
120 * Provides component's user dashboard page object.
123 * component's User Dashboard applet object
129 public function getUserDashboardObject() {
130 // no dashboard element for this component
136 * Provides information about user dashboard element
137 * offered by this component.
140 * collection of required dashboard settings,
141 * null if no element offered
147 public function registerTab() {
148 // this component doesn't use contact record tabs
156 public function getIcon() {
157 return 'crm-i fa-table';
162 * Provides information about advanced search pane
163 * offered by this component.
166 * collection of required pane settings,
167 * null if no element offered
173 public function registerAdvancedSearchPane() {
174 // this component doesn't use advanced search
180 * Provides potential activity types that this
181 * component might want to register in activity history.
182 * Needs to be implemented in component's information
186 * collection of activity types
192 public function getActivityTypes() {
197 * add shortcut to Create New.
200 public function creatNewShortcut(&$shortCuts) {