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