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
19 class CRM_Report_Info
extends CRM_Core_Component_Info
{
25 protected $keyword = 'report';
29 * Provides base information about the component.
30 * Needs to be implemented in component's information
34 * collection of required component settings
36 public function getInfo() {
38 'name' => 'CiviReport',
39 'translatedName' => ts('CiviReport'),
40 'title' => ts('CiviCRM Report Engine'),
42 'showActivitiesInCore' => 1,
48 * Provides permissions that are used by component.
49 * Needs to be implemented in component's information
52 * NOTE: if using conditionally permission return,
53 * implementation of $getAllUnconditionally is required.
55 * @param bool $getAllUnconditionally
56 * @param bool $descriptions
57 * Whether to return permission descriptions
60 * collection of permissions, null if none
62 public function getPermissions($getAllUnconditionally = FALSE, $descriptions = FALSE) {
64 'access CiviReport' => [
65 ts('access CiviReport'),
68 'access Report Criteria' => [
69 ts('access Report Criteria'),
70 ts('Change report search criteria'),
72 'save Report Criteria' => [
73 ts('save Report Criteria'),
74 ts('Save report search criteria'),
76 'administer private reports' => [
77 ts('administer private reports'),
78 ts('Edit all private reports'),
80 'administer reserved reports' => [
81 ts('administer reserved reports'),
82 ts('Edit all reports that have been marked as reserved'),
84 'administer Reports' => [
85 ts('administer Reports'),
86 ts('Manage report templates'),
88 'view report sql' => [
89 ts('view report sql'),
90 ts('View sql used in CiviReports'),
95 foreach ($permissions as $name => $attr) {
96 $permissions[$name] = array_shift($attr);
105 * Provides information about user dashboard element
106 * offered by this component.
109 * collection of required dashboard settings,
110 * null if no element offered
112 public function getUserDashboardElement() {
113 // no dashboard element for this component
118 * Provides component's user dashboard page object.
121 * component's User Dashboard applet object
127 public function getUserDashboardObject() {
128 // no dashboard element for this component
134 * Provides information about user dashboard element
135 * offered by this component.
138 * collection of required dashboard settings,
139 * null if no element offered
145 public function registerTab() {
146 // this component doesn't use contact record tabs
154 public function getIcon() {
155 return 'crm-i fa-table';
160 * Provides information about advanced search pane
161 * offered by this component.
164 * collection of required pane settings,
165 * null if no element offered
171 public function registerAdvancedSearchPane() {
172 // this component doesn't use advanced search
178 * Provides potential activity types that this
179 * component might want to register in activity history.
180 * Needs to be implemented in component's information
184 * collection of activity types
190 public function getActivityTypes() {
195 * add shortcut to Create New.
198 public function creatNewShortcut(&$shortCuts) {