3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Report/ReportInstance.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:09ffdd1693f38f5790d4c9c00d3c5d2f)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Report_DAO_ReportInstance constructor.
40 class CRM_Report_DAO_ReportInstance
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_report_instance';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Which Domain is this instance for
66 * Report Instance Title.
72 * FK to civicrm_option_value for the report template
78 * when combined with report_id/template uniquely identifies the instance
84 * arguments that are passed in the url when invoking the instance
90 * Report Instance description.
96 * permission required to be able to run this instance
102 * role required to be able to run this instance
108 * Submitted form values for this report
114 * Is this entry active?
120 * FK to contact table.
126 * FK to contact table.
136 public $email_subject;
138 * comma-separated list of email addresses to send the report to
144 * comma-separated list of email addresses to send the report to
150 * comma-separated list of email addresses to send the report to
156 * comma-separated list of email addresses to send the report to
162 * FK to navigation ID
166 public $navigation_id;
168 * FK to instance ID drilldown to
172 public $drilldown_id;
181 function __construct() {
182 $this->__table
= 'civicrm_report_instance';
183 parent
::__construct();
186 * Returns foreign keys and entity references.
189 * [CRM_Core_Reference_Interface]
191 static function getReferenceColumns() {
192 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
193 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
194 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
195 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
196 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'owner_id', 'civicrm_contact', 'id');
197 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'navigation_id', 'civicrm_navigation', 'id');
198 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'drilldown_id', 'civicrm_report_instance', 'id');
199 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
201 return Civi
::$statics[__CLASS__
]['links'];
204 * Returns all the column names of this table
208 static function &fields() {
209 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
210 Civi
::$statics[__CLASS__
]['fields'] = array(
213 'type' => CRM_Utils_Type
::T_INT
,
214 'title' => ts('Report Instance ID') ,
215 'description' => 'Report Instance ID',
217 'table_name' => 'civicrm_report_instance',
218 'entity' => 'ReportInstance',
219 'bao' => 'CRM_Report_BAO_ReportInstance',
222 'domain_id' => array(
223 'name' => 'domain_id',
224 'type' => CRM_Utils_Type
::T_INT
,
225 'title' => ts('Report Instance Domain ID') ,
226 'description' => 'Which Domain is this instance for',
228 'table_name' => 'civicrm_report_instance',
229 'entity' => 'ReportInstance',
230 'bao' => 'CRM_Report_BAO_ReportInstance',
232 'FKClassName' => 'CRM_Core_DAO_Domain',
233 'pseudoconstant' => array(
234 'table' => 'civicrm_domain',
236 'labelColumn' => 'name',
241 'type' => CRM_Utils_Type
::T_STRING
,
242 'title' => ts('Report Instance Title') ,
243 'description' => 'Report Instance Title.',
245 'size' => CRM_Utils_Type
::HUGE
,
246 'table_name' => 'civicrm_report_instance',
247 'entity' => 'ReportInstance',
248 'bao' => 'CRM_Report_BAO_ReportInstance',
254 'report_id' => array(
255 'name' => 'report_id',
256 'type' => CRM_Utils_Type
::T_STRING
,
257 'title' => ts('Report template ID') ,
258 'description' => 'FK to civicrm_option_value for the report template',
261 'size' => CRM_Utils_Type
::HUGE
,
262 'table_name' => 'civicrm_report_instance',
263 'entity' => 'ReportInstance',
264 'bao' => 'CRM_Report_BAO_ReportInstance',
272 'type' => CRM_Utils_Type
::T_STRING
,
273 'title' => ts('Report instance Name') ,
274 'description' => 'when combined with report_id/template uniquely identifies the instance',
276 'size' => CRM_Utils_Type
::HUGE
,
277 'table_name' => 'civicrm_report_instance',
278 'entity' => 'ReportInstance',
279 'bao' => 'CRM_Report_BAO_ReportInstance',
287 'type' => CRM_Utils_Type
::T_STRING
,
288 'title' => ts('Report Instance Arguments') ,
289 'description' => 'arguments that are passed in the url when invoking the instance',
291 'size' => CRM_Utils_Type
::HUGE
,
292 'table_name' => 'civicrm_report_instance',
293 'entity' => 'ReportInstance',
294 'bao' => 'CRM_Report_BAO_ReportInstance',
300 'description' => array(
301 'name' => 'description',
302 'type' => CRM_Utils_Type
::T_STRING
,
303 'title' => ts('Report Instance description') ,
304 'description' => 'Report Instance description.',
306 'size' => CRM_Utils_Type
::HUGE
,
307 'table_name' => 'civicrm_report_instance',
308 'entity' => 'ReportInstance',
309 'bao' => 'CRM_Report_BAO_ReportInstance',
315 'permission' => array(
316 'name' => 'permission',
317 'type' => CRM_Utils_Type
::T_STRING
,
318 'title' => ts('Report Instance Permissions') ,
319 'description' => 'permission required to be able to run this instance',
321 'size' => CRM_Utils_Type
::HUGE
,
322 'table_name' => 'civicrm_report_instance',
323 'entity' => 'ReportInstance',
324 'bao' => 'CRM_Report_BAO_ReportInstance',
330 'grouprole' => array(
331 'name' => 'grouprole',
332 'type' => CRM_Utils_Type
::T_STRING
,
333 'title' => ts('Report Instance Assigned to Roles') ,
334 'description' => 'role required to be able to run this instance',
336 'size' => CRM_Utils_Type
::HUGE
,
337 'table_name' => 'civicrm_report_instance',
338 'entity' => 'ReportInstance',
339 'bao' => 'CRM_Report_BAO_ReportInstance',
345 'form_values' => array(
346 'name' => 'form_values',
347 'type' => CRM_Utils_Type
::T_TEXT
,
348 'title' => ts('Submitted Form Values') ,
349 'description' => 'Submitted form values for this report',
351 'where' => 'civicrm_report_instance.form_values',
352 'headerPattern' => '',
355 'table_name' => 'civicrm_report_instance',
356 'entity' => 'ReportInstance',
357 'bao' => 'CRM_Report_BAO_ReportInstance',
359 'serialize' => self
::SERIALIZE_PHP
,
361 'is_active' => array(
362 'name' => 'is_active',
363 'type' => CRM_Utils_Type
::T_BOOLEAN
,
364 'title' => ts('Report Instance is Active') ,
365 'description' => 'Is this entry active?',
366 'table_name' => 'civicrm_report_instance',
367 'entity' => 'ReportInstance',
368 'bao' => 'CRM_Report_BAO_ReportInstance',
371 'type' => 'CheckBox',
374 'created_id' => array(
375 'name' => 'created_id',
376 'type' => CRM_Utils_Type
::T_INT
,
377 'title' => ts('Report Instance Created By') ,
378 'description' => 'FK to contact table.',
379 'table_name' => 'civicrm_report_instance',
380 'entity' => 'ReportInstance',
381 'bao' => 'CRM_Report_BAO_ReportInstance',
383 'FKClassName' => 'CRM_Contact_DAO_Contact',
386 'name' => 'owner_id',
387 'type' => CRM_Utils_Type
::T_INT
,
388 'title' => ts('Report Instance Owned By') ,
389 'description' => 'FK to contact table.',
390 'table_name' => 'civicrm_report_instance',
391 'entity' => 'ReportInstance',
392 'bao' => 'CRM_Report_BAO_ReportInstance',
394 'FKClassName' => 'CRM_Contact_DAO_Contact',
396 'email_subject' => array(
397 'name' => 'email_subject',
398 'type' => CRM_Utils_Type
::T_STRING
,
399 'title' => ts('Report Instance email Subject') ,
400 'description' => 'Subject of email',
402 'size' => CRM_Utils_Type
::HUGE
,
403 'table_name' => 'civicrm_report_instance',
404 'entity' => 'ReportInstance',
405 'bao' => 'CRM_Report_BAO_ReportInstance',
412 'name' => 'email_to',
413 'type' => CRM_Utils_Type
::T_TEXT
,
414 'title' => ts('Email Report Instance To') ,
415 'description' => 'comma-separated list of email addresses to send the report to',
416 'table_name' => 'civicrm_report_instance',
417 'entity' => 'ReportInstance',
418 'bao' => 'CRM_Report_BAO_ReportInstance',
425 'name' => 'email_cc',
426 'type' => CRM_Utils_Type
::T_TEXT
,
427 'title' => ts('cc Email Report Instance To') ,
428 'description' => 'comma-separated list of email addresses to send the report to',
429 'table_name' => 'civicrm_report_instance',
430 'entity' => 'ReportInstance',
431 'bao' => 'CRM_Report_BAO_ReportInstance',
439 'type' => CRM_Utils_Type
::T_TEXT
,
440 'title' => ts('Report Instance Header') ,
441 'description' => 'comma-separated list of email addresses to send the report to',
444 'table_name' => 'civicrm_report_instance',
445 'entity' => 'ReportInstance',
446 'bao' => 'CRM_Report_BAO_ReportInstance',
449 'type' => 'TextArea',
454 'type' => CRM_Utils_Type
::T_TEXT
,
455 'title' => ts('Report Instance Footer') ,
456 'description' => 'comma-separated list of email addresses to send the report to',
459 'table_name' => 'civicrm_report_instance',
460 'entity' => 'ReportInstance',
461 'bao' => 'CRM_Report_BAO_ReportInstance',
464 'type' => 'TextArea',
467 'navigation_id' => array(
468 'name' => 'navigation_id',
469 'type' => CRM_Utils_Type
::T_INT
,
470 'title' => ts('Navigation ID') ,
471 'description' => 'FK to navigation ID',
473 'where' => 'civicrm_report_instance.navigation_id',
474 'headerPattern' => '',
477 'table_name' => 'civicrm_report_instance',
478 'entity' => 'ReportInstance',
479 'bao' => 'CRM_Report_BAO_ReportInstance',
481 'FKClassName' => 'CRM_Core_DAO_Navigation',
483 'drilldown_id' => array(
484 'name' => 'drilldown_id',
485 'type' => CRM_Utils_Type
::T_INT
,
486 'title' => ts('Drilldown Report ID') ,
487 'description' => 'FK to instance ID drilldown to',
489 'where' => 'civicrm_report_instance.drilldown_id',
490 'headerPattern' => '',
493 'table_name' => 'civicrm_report_instance',
494 'entity' => 'ReportInstance',
495 'bao' => 'CRM_Report_BAO_ReportInstance',
497 'FKClassName' => 'CRM_Report_DAO_ReportInstance',
499 'is_reserved' => array(
500 'name' => 'is_reserved',
501 'type' => CRM_Utils_Type
::T_BOOLEAN
,
502 'title' => ts('Instance is Reserved') ,
503 'table_name' => 'civicrm_report_instance',
504 'entity' => 'ReportInstance',
505 'bao' => 'CRM_Report_BAO_ReportInstance',
508 'type' => 'CheckBox',
512 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
514 return Civi
::$statics[__CLASS__
]['fields'];
517 * Return a mapping from field-name to the corresponding key (as used in fields()).
520 * Array(string $name => string $uniqueName).
522 static function &fieldKeys() {
523 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
524 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
526 return Civi
::$statics[__CLASS__
]['fieldKeys'];
529 * Returns the names of this table
533 static function getTableName() {
534 return self
::$_tableName;
537 * Returns if this table needs to be logged
545 * Returns the list of fields that can be imported
547 * @param bool $prefix
551 static function &import($prefix = false) {
552 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'report_instance', $prefix, array());
556 * Returns the list of fields that can be exported
558 * @param bool $prefix
562 static function &export($prefix = false) {
563 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'report_instance', $prefix, array());
567 * Returns the list of indices
569 public static function indices($localize = TRUE) {
571 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;