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