Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
ca5cec67 | 5 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Report/ReportInstance.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
449c4e6b | 9 | * (GenCodeChecksum:e578602adaab855b72e2aef8992cb97e) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the ReportInstance entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO { |
c3fc2621 | 16 | |
e501603b | 17 | /** |
f41f0342 | 18 | * Static instance to hold the table name. |
e501603b TO |
19 | * |
20 | * @var string | |
21 | */ | |
fa45b5b9 | 22 | public static $_tableName = 'civicrm_report_instance'; |
c3fc2621 | 23 | |
449c4e6b CW |
24 | /** |
25 | * Icon associated with this entity. | |
26 | * | |
27 | * @var string | |
28 | */ | |
29 | public static $_icon = 'fa-bar-chart'; | |
30 | ||
e501603b | 31 | /** |
f41f0342 | 32 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b | 33 | * |
c3fc2621 | 34 | * @var bool |
e501603b | 35 | */ |
fa45b5b9 | 36 | public static $_log = FALSE; |
c3fc2621 | 37 | |
e501603b TO |
38 | /** |
39 | * Report Instance ID | |
40 | * | |
e6ca0a57 | 41 | * @var int |
e501603b TO |
42 | */ |
43 | public $id; | |
c3fc2621 | 44 | |
e501603b TO |
45 | /** |
46 | * Which Domain is this instance for | |
47 | * | |
e6ca0a57 | 48 | * @var int |
e501603b TO |
49 | */ |
50 | public $domain_id; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * Report Instance Title. | |
54 | * | |
55 | * @var string | |
56 | */ | |
57 | public $title; | |
c3fc2621 | 58 | |
e501603b TO |
59 | /** |
60 | * FK to civicrm_option_value for the report template | |
61 | * | |
62 | * @var string | |
63 | */ | |
64 | public $report_id; | |
c3fc2621 | 65 | |
e501603b TO |
66 | /** |
67 | * when combined with report_id/template uniquely identifies the instance | |
68 | * | |
69 | * @var string | |
70 | */ | |
71 | public $name; | |
c3fc2621 | 72 | |
e501603b TO |
73 | /** |
74 | * arguments that are passed in the url when invoking the instance | |
75 | * | |
76 | * @var string | |
77 | */ | |
78 | public $args; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * Report Instance description. | |
82 | * | |
83 | * @var string | |
84 | */ | |
85 | public $description; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * permission required to be able to run this instance | |
89 | * | |
90 | * @var string | |
91 | */ | |
92 | public $permission; | |
c3fc2621 | 93 | |
e501603b TO |
94 | /** |
95 | * role required to be able to run this instance | |
96 | * | |
97 | * @var string | |
98 | */ | |
99 | public $grouprole; | |
c3fc2621 | 100 | |
e501603b TO |
101 | /** |
102 | * Submitted form values for this report | |
103 | * | |
b31aa78e | 104 | * @var longtext |
e501603b TO |
105 | */ |
106 | public $form_values; | |
c3fc2621 | 107 | |
e501603b TO |
108 | /** |
109 | * Is this entry active? | |
110 | * | |
e6ca0a57 | 111 | * @var bool |
e501603b TO |
112 | */ |
113 | public $is_active; | |
c3fc2621 | 114 | |
e501603b TO |
115 | /** |
116 | * FK to contact table. | |
117 | * | |
e6ca0a57 | 118 | * @var int |
e501603b TO |
119 | */ |
120 | public $created_id; | |
c3fc2621 | 121 | |
e501603b TO |
122 | /** |
123 | * FK to contact table. | |
124 | * | |
e6ca0a57 | 125 | * @var int |
e501603b TO |
126 | */ |
127 | public $owner_id; | |
c3fc2621 | 128 | |
e501603b TO |
129 | /** |
130 | * Subject of email | |
131 | * | |
132 | * @var string | |
133 | */ | |
134 | public $email_subject; | |
c3fc2621 | 135 | |
e501603b TO |
136 | /** |
137 | * comma-separated list of email addresses to send the report to | |
138 | * | |
139 | * @var text | |
140 | */ | |
141 | public $email_to; | |
c3fc2621 | 142 | |
e501603b TO |
143 | /** |
144 | * comma-separated list of email addresses to send the report to | |
145 | * | |
146 | * @var text | |
147 | */ | |
148 | public $email_cc; | |
c3fc2621 | 149 | |
e501603b TO |
150 | /** |
151 | * comma-separated list of email addresses to send the report to | |
152 | * | |
153 | * @var text | |
154 | */ | |
155 | public $header; | |
c3fc2621 | 156 | |
e501603b TO |
157 | /** |
158 | * comma-separated list of email addresses to send the report to | |
159 | * | |
160 | * @var text | |
161 | */ | |
162 | public $footer; | |
c3fc2621 | 163 | |
e501603b TO |
164 | /** |
165 | * FK to navigation ID | |
166 | * | |
e6ca0a57 | 167 | * @var int |
e501603b TO |
168 | */ |
169 | public $navigation_id; | |
c3fc2621 | 170 | |
e501603b TO |
171 | /** |
172 | * FK to instance ID drilldown to | |
173 | * | |
e6ca0a57 | 174 | * @var int |
e501603b TO |
175 | */ |
176 | public $drilldown_id; | |
c3fc2621 | 177 | |
e501603b | 178 | /** |
e6ca0a57 | 179 | * @var bool |
e501603b TO |
180 | */ |
181 | public $is_reserved; | |
c3fc2621 | 182 | |
e501603b | 183 | /** |
f41f0342 | 184 | * Class constructor. |
e501603b | 185 | */ |
c3fc2621 | 186 | public function __construct() { |
e501603b TO |
187 | $this->__table = 'civicrm_report_instance'; |
188 | parent::__construct(); | |
189 | } | |
c3fc2621 | 190 | |
e501603b | 191 | /** |
449c4e6b CW |
192 | * Returns localized title of this entity. |
193 | */ | |
194 | public static function getEntityTitle() { | |
195 | return ts('Reports'); | |
196 | } | |
197 | ||
198 | /** | |
f41f0342 | 199 | * Returns foreign keys and entity references. |
e501603b TO |
200 | * |
201 | * @return array | |
202 | * [CRM_Core_Reference_Interface] | |
203 | */ | |
c3fc2621 | 204 | public static function getReferenceColumns() { |
346aaaba | 205 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
fa45b5b9 | 206 | Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); |
c3fc2621 CW |
207 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'domain_id', 'civicrm_domain', 'id'); |
208 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id'); | |
209 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'owner_id', 'civicrm_contact', 'id'); | |
210 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'navigation_id', 'civicrm_navigation', 'id'); | |
211 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'drilldown_id', 'civicrm_report_instance', 'id'); | |
346aaaba | 212 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 213 | } |
346aaaba | 214 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 215 | } |
c3fc2621 | 216 | |
e501603b TO |
217 | /** |
218 | * Returns all the column names of this table | |
219 | * | |
220 | * @return array | |
221 | */ | |
c3fc2621 | 222 | public static function &fields() { |
346aaaba | 223 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
224 | Civi::$statics[__CLASS__]['fields'] = [ |
225 | 'id' => [ | |
e501603b TO |
226 | 'name' => 'id', |
227 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 228 | 'title' => ts('Report Instance ID'), |
215b423e | 229 | 'description' => ts('Report Instance ID'), |
c3fc2621 | 230 | 'required' => TRUE, |
a36434b9 | 231 | 'where' => 'civicrm_report_instance.id', |
522a26c9 | 232 | 'table_name' => 'civicrm_report_instance', |
233 | 'entity' => 'ReportInstance', | |
234 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 235 | 'localizable' => 0, |
c3fc2621 CW |
236 | ], |
237 | 'domain_id' => [ | |
e501603b TO |
238 | 'name' => 'domain_id', |
239 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 240 | 'title' => ts('Report Instance Domain ID'), |
215b423e | 241 | 'description' => ts('Which Domain is this instance for'), |
c3fc2621 | 242 | 'required' => TRUE, |
a36434b9 | 243 | 'where' => 'civicrm_report_instance.domain_id', |
522a26c9 | 244 | 'table_name' => 'civicrm_report_instance', |
245 | 'entity' => 'ReportInstance', | |
246 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 247 | 'localizable' => 0, |
e501603b | 248 | 'FKClassName' => 'CRM_Core_DAO_Domain', |
c3fc2621 | 249 | 'pseudoconstant' => [ |
e501603b TO |
250 | 'table' => 'civicrm_domain', |
251 | 'keyColumn' => 'id', | |
252 | 'labelColumn' => 'name', | |
e6ca0a57 | 253 | ], |
c3fc2621 CW |
254 | ], |
255 | 'title' => [ | |
e501603b TO |
256 | 'name' => 'title', |
257 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 258 | 'title' => ts('Report Instance Title'), |
215b423e | 259 | 'description' => ts('Report Instance Title.'), |
e501603b TO |
260 | 'maxlength' => 255, |
261 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 262 | 'where' => 'civicrm_report_instance.title', |
522a26c9 | 263 | 'table_name' => 'civicrm_report_instance', |
264 | 'entity' => 'ReportInstance', | |
265 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 266 | 'localizable' => 0, |
c3fc2621 | 267 | 'html' => [ |
e501603b | 268 | 'type' => 'Text', |
c3fc2621 CW |
269 | ], |
270 | ], | |
271 | 'report_id' => [ | |
e501603b TO |
272 | 'name' => 'report_id', |
273 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 274 | 'title' => ts('Report template ID'), |
215b423e | 275 | 'description' => ts('FK to civicrm_option_value for the report template'), |
c3fc2621 | 276 | 'required' => TRUE, |
1435405e SL |
277 | 'maxlength' => 512, |
278 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 279 | 'where' => 'civicrm_report_instance.report_id', |
522a26c9 | 280 | 'table_name' => 'civicrm_report_instance', |
281 | 'entity' => 'ReportInstance', | |
282 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 283 | 'localizable' => 0, |
c3fc2621 | 284 | 'html' => [ |
e501603b | 285 | 'type' => 'Select', |
c3fc2621 CW |
286 | ], |
287 | ], | |
288 | 'name' => [ | |
e501603b TO |
289 | 'name' => 'name', |
290 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 291 | 'title' => ts('Report instance Name'), |
215b423e | 292 | 'description' => ts('when combined with report_id/template uniquely identifies the instance'), |
e501603b TO |
293 | 'maxlength' => 255, |
294 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 295 | 'where' => 'civicrm_report_instance.name', |
522a26c9 | 296 | 'table_name' => 'civicrm_report_instance', |
297 | 'entity' => 'ReportInstance', | |
298 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 299 | 'localizable' => 0, |
c3fc2621 | 300 | 'html' => [ |
e501603b | 301 | 'type' => 'Text', |
c3fc2621 CW |
302 | ], |
303 | ], | |
304 | 'args' => [ | |
e501603b TO |
305 | 'name' => 'args', |
306 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 307 | 'title' => ts('Report Instance Arguments'), |
215b423e | 308 | 'description' => ts('arguments that are passed in the url when invoking the instance'), |
e501603b TO |
309 | 'maxlength' => 255, |
310 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 311 | 'where' => 'civicrm_report_instance.args', |
522a26c9 | 312 | 'table_name' => 'civicrm_report_instance', |
313 | 'entity' => 'ReportInstance', | |
314 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 315 | 'localizable' => 0, |
c3fc2621 | 316 | 'html' => [ |
e501603b | 317 | 'type' => 'Text', |
c3fc2621 CW |
318 | ], |
319 | ], | |
320 | 'description' => [ | |
e501603b TO |
321 | 'name' => 'description', |
322 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 323 | 'title' => ts('Report Instance description'), |
215b423e | 324 | 'description' => ts('Report Instance description.'), |
e501603b TO |
325 | 'maxlength' => 255, |
326 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 327 | 'where' => 'civicrm_report_instance.description', |
522a26c9 | 328 | 'table_name' => 'civicrm_report_instance', |
329 | 'entity' => 'ReportInstance', | |
330 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 331 | 'localizable' => 0, |
c3fc2621 | 332 | 'html' => [ |
e501603b | 333 | 'type' => 'Text', |
c3fc2621 CW |
334 | ], |
335 | ], | |
336 | 'permission' => [ | |
e501603b TO |
337 | 'name' => 'permission', |
338 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 339 | 'title' => ts('Report Instance Permissions'), |
215b423e | 340 | 'description' => ts('permission required to be able to run this instance'), |
e501603b TO |
341 | 'maxlength' => 255, |
342 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 343 | 'where' => 'civicrm_report_instance.permission', |
522a26c9 | 344 | 'table_name' => 'civicrm_report_instance', |
345 | 'entity' => 'ReportInstance', | |
346 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 347 | 'localizable' => 0, |
c3fc2621 | 348 | 'html' => [ |
e501603b | 349 | 'type' => 'Text', |
c3fc2621 CW |
350 | ], |
351 | ], | |
352 | 'grouprole' => [ | |
e501603b TO |
353 | 'name' => 'grouprole', |
354 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 355 | 'title' => ts('Report Instance Assigned to Roles'), |
215b423e | 356 | 'description' => ts('role required to be able to run this instance'), |
e501603b TO |
357 | 'maxlength' => 1024, |
358 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 359 | 'where' => 'civicrm_report_instance.grouprole', |
522a26c9 | 360 | 'table_name' => 'civicrm_report_instance', |
361 | 'entity' => 'ReportInstance', | |
362 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 363 | 'localizable' => 0, |
c3fc2621 | 364 | 'html' => [ |
e501603b | 365 | 'type' => 'Text', |
c3fc2621 CW |
366 | ], |
367 | ], | |
368 | 'form_values' => [ | |
e501603b | 369 | 'name' => 'form_values', |
b31aa78e | 370 | 'type' => CRM_Utils_Type::T_LONGTEXT, |
c3fc2621 | 371 | 'title' => ts('Submitted Form Values'), |
215b423e | 372 | 'description' => ts('Submitted form values for this report'), |
c3fc2621 | 373 | 'import' => TRUE, |
e501603b | 374 | 'where' => 'civicrm_report_instance.form_values', |
c3fc2621 | 375 | 'export' => TRUE, |
522a26c9 | 376 | 'table_name' => 'civicrm_report_instance', |
377 | 'entity' => 'ReportInstance', | |
378 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 379 | 'localizable' => 0, |
2a5c9b4d | 380 | 'serialize' => self::SERIALIZE_PHP, |
c3fc2621 CW |
381 | ], |
382 | 'is_active' => [ | |
e501603b TO |
383 | 'name' => 'is_active', |
384 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 385 | 'title' => ts('Report Instance is Active'), |
215b423e | 386 | 'description' => ts('Is this entry active?'), |
a36434b9 | 387 | 'where' => 'civicrm_report_instance.is_active', |
522a26c9 | 388 | 'table_name' => 'civicrm_report_instance', |
389 | 'entity' => 'ReportInstance', | |
390 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 391 | 'localizable' => 0, |
c3fc2621 | 392 | 'html' => [ |
e501603b | 393 | 'type' => 'CheckBox', |
c3fc2621 CW |
394 | ], |
395 | ], | |
396 | 'created_id' => [ | |
e501603b TO |
397 | 'name' => 'created_id', |
398 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 399 | 'title' => ts('Report Instance Created By'), |
215b423e | 400 | 'description' => ts('FK to contact table.'), |
a36434b9 | 401 | 'where' => 'civicrm_report_instance.created_id', |
522a26c9 | 402 | 'table_name' => 'civicrm_report_instance', |
403 | 'entity' => 'ReportInstance', | |
404 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 405 | 'localizable' => 0, |
e501603b | 406 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
407 | ], |
408 | 'owner_id' => [ | |
e501603b TO |
409 | 'name' => 'owner_id', |
410 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 411 | 'title' => ts('Report Instance Owned By'), |
215b423e | 412 | 'description' => ts('FK to contact table.'), |
a36434b9 | 413 | 'where' => 'civicrm_report_instance.owner_id', |
522a26c9 | 414 | 'table_name' => 'civicrm_report_instance', |
415 | 'entity' => 'ReportInstance', | |
416 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 417 | 'localizable' => 0, |
e501603b | 418 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
419 | ], |
420 | 'email_subject' => [ | |
e501603b TO |
421 | 'name' => 'email_subject', |
422 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 423 | 'title' => ts('Report Instance email Subject'), |
215b423e | 424 | 'description' => ts('Subject of email'), |
e501603b TO |
425 | 'maxlength' => 255, |
426 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 427 | 'where' => 'civicrm_report_instance.email_subject', |
522a26c9 | 428 | 'table_name' => 'civicrm_report_instance', |
429 | 'entity' => 'ReportInstance', | |
430 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 431 | 'localizable' => 0, |
c3fc2621 | 432 | 'html' => [ |
e501603b | 433 | 'type' => 'Text', |
c3fc2621 CW |
434 | ], |
435 | ], | |
436 | 'email_to' => [ | |
e501603b TO |
437 | 'name' => 'email_to', |
438 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 439 | 'title' => ts('Email Report Instance To'), |
215b423e | 440 | 'description' => ts('comma-separated list of email addresses to send the report to'), |
a36434b9 | 441 | 'where' => 'civicrm_report_instance.email_to', |
522a26c9 | 442 | 'table_name' => 'civicrm_report_instance', |
443 | 'entity' => 'ReportInstance', | |
444 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 445 | 'localizable' => 0, |
c3fc2621 | 446 | 'html' => [ |
e501603b | 447 | 'type' => 'Text', |
c3fc2621 CW |
448 | ], |
449 | ], | |
450 | 'email_cc' => [ | |
e501603b TO |
451 | 'name' => 'email_cc', |
452 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 453 | 'title' => ts('cc Email Report Instance To'), |
215b423e | 454 | 'description' => ts('comma-separated list of email addresses to send the report to'), |
a36434b9 | 455 | 'where' => 'civicrm_report_instance.email_cc', |
522a26c9 | 456 | 'table_name' => 'civicrm_report_instance', |
457 | 'entity' => 'ReportInstance', | |
458 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 459 | 'localizable' => 0, |
c3fc2621 | 460 | 'html' => [ |
e501603b | 461 | 'type' => 'Text', |
c3fc2621 CW |
462 | ], |
463 | ], | |
464 | 'header' => [ | |
e501603b TO |
465 | 'name' => 'header', |
466 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 467 | 'title' => ts('Report Instance Header'), |
215b423e | 468 | 'description' => ts('comma-separated list of email addresses to send the report to'), |
e501603b TO |
469 | 'rows' => 4, |
470 | 'cols' => 60, | |
a36434b9 | 471 | 'where' => 'civicrm_report_instance.header', |
522a26c9 | 472 | 'table_name' => 'civicrm_report_instance', |
473 | 'entity' => 'ReportInstance', | |
474 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 475 | 'localizable' => 0, |
c3fc2621 | 476 | 'html' => [ |
e501603b | 477 | 'type' => 'TextArea', |
c3fc2621 CW |
478 | ], |
479 | ], | |
480 | 'footer' => [ | |
e501603b TO |
481 | 'name' => 'footer', |
482 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 483 | 'title' => ts('Report Instance Footer'), |
215b423e | 484 | 'description' => ts('comma-separated list of email addresses to send the report to'), |
e501603b TO |
485 | 'rows' => 4, |
486 | 'cols' => 60, | |
a36434b9 | 487 | 'where' => 'civicrm_report_instance.footer', |
522a26c9 | 488 | 'table_name' => 'civicrm_report_instance', |
489 | 'entity' => 'ReportInstance', | |
490 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 491 | 'localizable' => 0, |
c3fc2621 | 492 | 'html' => [ |
e501603b | 493 | 'type' => 'TextArea', |
c3fc2621 CW |
494 | ], |
495 | ], | |
496 | 'navigation_id' => [ | |
e501603b TO |
497 | 'name' => 'navigation_id', |
498 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 499 | 'title' => ts('Navigation ID'), |
215b423e | 500 | 'description' => ts('FK to navigation ID'), |
c3fc2621 | 501 | 'import' => TRUE, |
e501603b | 502 | 'where' => 'civicrm_report_instance.navigation_id', |
c3fc2621 | 503 | 'export' => TRUE, |
522a26c9 | 504 | 'table_name' => 'civicrm_report_instance', |
505 | 'entity' => 'ReportInstance', | |
506 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 507 | 'localizable' => 0, |
e501603b | 508 | 'FKClassName' => 'CRM_Core_DAO_Navigation', |
c3fc2621 CW |
509 | ], |
510 | 'drilldown_id' => [ | |
e501603b TO |
511 | 'name' => 'drilldown_id', |
512 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 513 | 'title' => ts('Drilldown Report ID'), |
215b423e | 514 | 'description' => ts('FK to instance ID drilldown to'), |
c3fc2621 | 515 | 'import' => TRUE, |
e501603b | 516 | 'where' => 'civicrm_report_instance.drilldown_id', |
c3fc2621 | 517 | 'export' => TRUE, |
522a26c9 | 518 | 'table_name' => 'civicrm_report_instance', |
519 | 'entity' => 'ReportInstance', | |
520 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 521 | 'localizable' => 0, |
e501603b | 522 | 'FKClassName' => 'CRM_Report_DAO_ReportInstance', |
c3fc2621 CW |
523 | ], |
524 | 'is_reserved' => [ | |
e501603b TO |
525 | 'name' => 'is_reserved', |
526 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 527 | 'title' => ts('Instance is Reserved'), |
a36434b9 | 528 | 'where' => 'civicrm_report_instance.is_reserved', |
45a83e42 | 529 | 'default' => '0', |
522a26c9 | 530 | 'table_name' => 'civicrm_report_instance', |
531 | 'entity' => 'ReportInstance', | |
532 | 'bao' => 'CRM_Report_BAO_ReportInstance', | |
6a7e5e5d | 533 | 'localizable' => 0, |
c3fc2621 | 534 | 'html' => [ |
e501603b | 535 | 'type' => 'CheckBox', |
c3fc2621 CW |
536 | ], |
537 | ], | |
538 | ]; | |
346aaaba | 539 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 540 | } |
346aaaba | 541 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 542 | } |
c3fc2621 | 543 | |
e501603b | 544 | /** |
bd8e0b14 | 545 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
546 | * |
547 | * @return array | |
bd8e0b14 | 548 | * Array(string $name => string $uniqueName). |
e501603b | 549 | */ |
c3fc2621 | 550 | public static function &fieldKeys() { |
bd8e0b14 TO |
551 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
552 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 553 | } |
bd8e0b14 | 554 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 555 | } |
c3fc2621 | 556 | |
e501603b TO |
557 | /** |
558 | * Returns the names of this table | |
559 | * | |
560 | * @return string | |
561 | */ | |
c3fc2621 | 562 | public static function getTableName() { |
e501603b TO |
563 | return self::$_tableName; |
564 | } | |
c3fc2621 | 565 | |
e501603b TO |
566 | /** |
567 | * Returns if this table needs to be logged | |
568 | * | |
c3fc2621 | 569 | * @return bool |
e501603b | 570 | */ |
c3fc2621 | 571 | public function getLog() { |
e501603b TO |
572 | return self::$_log; |
573 | } | |
c3fc2621 | 574 | |
e501603b TO |
575 | /** |
576 | * Returns the list of fields that can be imported | |
577 | * | |
578 | * @param bool $prefix | |
579 | * | |
580 | * @return array | |
581 | */ | |
c3fc2621 CW |
582 | public static function &import($prefix = FALSE) { |
583 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'report_instance', $prefix, []); | |
60808919 | 584 | return $r; |
e501603b | 585 | } |
c3fc2621 | 586 | |
e501603b TO |
587 | /** |
588 | * Returns the list of fields that can be exported | |
589 | * | |
590 | * @param bool $prefix | |
591 | * | |
592 | * @return array | |
593 | */ | |
c3fc2621 CW |
594 | public static function &export($prefix = FALSE) { |
595 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'report_instance', $prefix, []); | |
60808919 | 596 | return $r; |
e501603b | 597 | } |
c3fc2621 | 598 | |
e7a6b91a AS |
599 | /** |
600 | * Returns the list of indices | |
c3fc2621 CW |
601 | * |
602 | * @param bool $localize | |
603 | * | |
604 | * @return array | |
e7a6b91a AS |
605 | */ |
606 | public static function indices($localize = TRUE) { | |
c3fc2621 | 607 | $indices = []; |
e7a6b91a AS |
608 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
609 | } | |
c3fc2621 | 610 | |
e501603b | 611 | } |