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:857f3f19bbbb33bf039b6ea95f2097c5)
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
::BIG
,
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',
360 'is_active' => array(
361 'name' => 'is_active',
362 'type' => CRM_Utils_Type
::T_BOOLEAN
,
363 'title' => ts('Report Instance is Active') ,
364 'description' => 'Is this entry active?',
365 'table_name' => 'civicrm_report_instance',
366 'entity' => 'ReportInstance',
367 'bao' => 'CRM_Report_BAO_ReportInstance',
370 'type' => 'CheckBox',
373 'created_id' => array(
374 'name' => 'created_id',
375 'type' => CRM_Utils_Type
::T_INT
,
376 'title' => ts('Report Instance Created By') ,
377 'description' => 'FK to contact table.',
378 'table_name' => 'civicrm_report_instance',
379 'entity' => 'ReportInstance',
380 'bao' => 'CRM_Report_BAO_ReportInstance',
382 'FKClassName' => 'CRM_Contact_DAO_Contact',
385 'name' => 'owner_id',
386 'type' => CRM_Utils_Type
::T_INT
,
387 'title' => ts('Report Instance Owned By') ,
388 'description' => 'FK to contact table.',
389 'table_name' => 'civicrm_report_instance',
390 'entity' => 'ReportInstance',
391 'bao' => 'CRM_Report_BAO_ReportInstance',
393 'FKClassName' => 'CRM_Contact_DAO_Contact',
395 'email_subject' => array(
396 'name' => 'email_subject',
397 'type' => CRM_Utils_Type
::T_STRING
,
398 'title' => ts('Report Instance email Subject') ,
399 'description' => 'Subject of email',
401 'size' => CRM_Utils_Type
::HUGE
,
402 'table_name' => 'civicrm_report_instance',
403 'entity' => 'ReportInstance',
404 'bao' => 'CRM_Report_BAO_ReportInstance',
411 'name' => 'email_to',
412 'type' => CRM_Utils_Type
::T_TEXT
,
413 'title' => ts('Email Report Instance To') ,
414 'description' => 'comma-separated list of email addresses to send the report to',
415 'table_name' => 'civicrm_report_instance',
416 'entity' => 'ReportInstance',
417 'bao' => 'CRM_Report_BAO_ReportInstance',
424 'name' => 'email_cc',
425 'type' => CRM_Utils_Type
::T_TEXT
,
426 'title' => ts('cc Email Report Instance To') ,
427 'description' => 'comma-separated list of email addresses to send the report to',
428 'table_name' => 'civicrm_report_instance',
429 'entity' => 'ReportInstance',
430 'bao' => 'CRM_Report_BAO_ReportInstance',
438 'type' => CRM_Utils_Type
::T_TEXT
,
439 'title' => ts('Report Instance Header') ,
440 'description' => 'comma-separated list of email addresses to send the report to',
443 'table_name' => 'civicrm_report_instance',
444 'entity' => 'ReportInstance',
445 'bao' => 'CRM_Report_BAO_ReportInstance',
448 'type' => 'TextArea',
453 'type' => CRM_Utils_Type
::T_TEXT
,
454 'title' => ts('Report Instance Footer') ,
455 'description' => 'comma-separated list of email addresses to send the report to',
458 'table_name' => 'civicrm_report_instance',
459 'entity' => 'ReportInstance',
460 'bao' => 'CRM_Report_BAO_ReportInstance',
463 'type' => 'TextArea',
466 'navigation_id' => array(
467 'name' => 'navigation_id',
468 'type' => CRM_Utils_Type
::T_INT
,
469 'title' => ts('Navigation ID') ,
470 'description' => 'FK to navigation ID',
472 'where' => 'civicrm_report_instance.navigation_id',
473 'headerPattern' => '',
476 'table_name' => 'civicrm_report_instance',
477 'entity' => 'ReportInstance',
478 'bao' => 'CRM_Report_BAO_ReportInstance',
480 'FKClassName' => 'CRM_Core_DAO_Navigation',
482 'drilldown_id' => array(
483 'name' => 'drilldown_id',
484 'type' => CRM_Utils_Type
::T_INT
,
485 'title' => ts('Drilldown Report ID') ,
486 'description' => 'FK to instance ID drilldown to',
488 'where' => 'civicrm_report_instance.drilldown_id',
489 'headerPattern' => '',
492 'table_name' => 'civicrm_report_instance',
493 'entity' => 'ReportInstance',
494 'bao' => 'CRM_Report_BAO_ReportInstance',
496 'FKClassName' => 'CRM_Report_DAO_ReportInstance',
498 'is_reserved' => array(
499 'name' => 'is_reserved',
500 'type' => CRM_Utils_Type
::T_BOOLEAN
,
501 'title' => ts('Instance is Reserved') ,
502 'table_name' => 'civicrm_report_instance',
503 'entity' => 'ReportInstance',
504 'bao' => 'CRM_Report_BAO_ReportInstance',
507 'type' => 'CheckBox',
511 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
513 return Civi
::$statics[__CLASS__
]['fields'];
516 * Return a mapping from field-name to the corresponding key (as used in fields()).
519 * Array(string $name => string $uniqueName).
521 static function &fieldKeys() {
522 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
523 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
525 return Civi
::$statics[__CLASS__
]['fieldKeys'];
528 * Returns the names of this table
532 static function getTableName() {
533 return self
::$_tableName;
536 * Returns if this table needs to be logged
544 * Returns the list of fields that can be imported
546 * @param bool $prefix
550 static function &import($prefix = false) {
551 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'report_instance', $prefix, array());
555 * Returns the list of fields that can be exported
557 * @param bool $prefix
561 static function &export($prefix = false) {
562 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'report_instance', $prefix, array());