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