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',
221 'domain_id' => array(
222 'name' => 'domain_id',
223 'type' => CRM_Utils_Type
::T_INT
,
224 'title' => ts('Report Instance Domain ID') ,
225 'description' => 'Which Domain is this instance for',
227 'table_name' => 'civicrm_report_instance',
228 'entity' => 'ReportInstance',
229 'bao' => 'CRM_Report_BAO_ReportInstance',
230 'FKClassName' => 'CRM_Core_DAO_Domain',
231 'pseudoconstant' => array(
232 'table' => 'civicrm_domain',
234 'labelColumn' => 'name',
239 'type' => CRM_Utils_Type
::T_STRING
,
240 'title' => ts('Report Instance Title') ,
241 'description' => 'Report Instance Title.',
243 'size' => CRM_Utils_Type
::HUGE
,
244 'table_name' => 'civicrm_report_instance',
245 'entity' => 'ReportInstance',
246 'bao' => 'CRM_Report_BAO_ReportInstance',
251 'report_id' => array(
252 'name' => 'report_id',
253 'type' => CRM_Utils_Type
::T_STRING
,
254 'title' => ts('Report template ID') ,
255 'description' => 'FK to civicrm_option_value for the report template',
258 'size' => CRM_Utils_Type
::BIG
,
259 'table_name' => 'civicrm_report_instance',
260 'entity' => 'ReportInstance',
261 'bao' => 'CRM_Report_BAO_ReportInstance',
268 'type' => CRM_Utils_Type
::T_STRING
,
269 'title' => ts('Report instance Name') ,
270 'description' => 'when combined with report_id/template uniquely identifies the instance',
272 'size' => CRM_Utils_Type
::HUGE
,
273 'table_name' => 'civicrm_report_instance',
274 'entity' => 'ReportInstance',
275 'bao' => 'CRM_Report_BAO_ReportInstance',
282 'type' => CRM_Utils_Type
::T_STRING
,
283 'title' => ts('Report Instance Arguments') ,
284 'description' => 'arguments that are passed in the url when invoking the instance',
286 'size' => CRM_Utils_Type
::HUGE
,
287 'table_name' => 'civicrm_report_instance',
288 'entity' => 'ReportInstance',
289 'bao' => 'CRM_Report_BAO_ReportInstance',
294 'description' => array(
295 'name' => 'description',
296 'type' => CRM_Utils_Type
::T_STRING
,
297 'title' => ts('Report Instance description') ,
298 'description' => 'Report Instance description.',
300 'size' => CRM_Utils_Type
::HUGE
,
301 'table_name' => 'civicrm_report_instance',
302 'entity' => 'ReportInstance',
303 'bao' => 'CRM_Report_BAO_ReportInstance',
308 'permission' => array(
309 'name' => 'permission',
310 'type' => CRM_Utils_Type
::T_STRING
,
311 'title' => ts('Report Instance Permissions') ,
312 'description' => 'permission required to be able to run this instance',
314 'size' => CRM_Utils_Type
::HUGE
,
315 'table_name' => 'civicrm_report_instance',
316 'entity' => 'ReportInstance',
317 'bao' => 'CRM_Report_BAO_ReportInstance',
322 'grouprole' => array(
323 'name' => 'grouprole',
324 'type' => CRM_Utils_Type
::T_STRING
,
325 'title' => ts('Report Instance Assigned to Roles') ,
326 'description' => 'role required to be able to run this instance',
328 'size' => CRM_Utils_Type
::HUGE
,
329 'table_name' => 'civicrm_report_instance',
330 'entity' => 'ReportInstance',
331 'bao' => 'CRM_Report_BAO_ReportInstance',
336 'form_values' => array(
337 'name' => 'form_values',
338 'type' => CRM_Utils_Type
::T_TEXT
,
339 'title' => ts('Submitted Form Values') ,
340 'description' => 'Submitted form values for this report',
342 'where' => 'civicrm_report_instance.form_values',
343 'headerPattern' => '',
346 'table_name' => 'civicrm_report_instance',
347 'entity' => 'ReportInstance',
348 'bao' => 'CRM_Report_BAO_ReportInstance',
350 'is_active' => array(
351 'name' => 'is_active',
352 'type' => CRM_Utils_Type
::T_BOOLEAN
,
353 'title' => ts('Report Instance is Active') ,
354 'description' => 'Is this entry active?',
355 'table_name' => 'civicrm_report_instance',
356 'entity' => 'ReportInstance',
357 'bao' => 'CRM_Report_BAO_ReportInstance',
359 'type' => 'CheckBox',
362 'created_id' => array(
363 'name' => 'created_id',
364 'type' => CRM_Utils_Type
::T_INT
,
365 'title' => ts('Report Instance Created By') ,
366 'description' => 'FK to contact table.',
367 'table_name' => 'civicrm_report_instance',
368 'entity' => 'ReportInstance',
369 'bao' => 'CRM_Report_BAO_ReportInstance',
370 'FKClassName' => 'CRM_Contact_DAO_Contact',
373 'name' => 'owner_id',
374 'type' => CRM_Utils_Type
::T_INT
,
375 'title' => ts('Report Instance Owned By') ,
376 'description' => 'FK to contact table.',
377 'table_name' => 'civicrm_report_instance',
378 'entity' => 'ReportInstance',
379 'bao' => 'CRM_Report_BAO_ReportInstance',
380 'FKClassName' => 'CRM_Contact_DAO_Contact',
382 'email_subject' => array(
383 'name' => 'email_subject',
384 'type' => CRM_Utils_Type
::T_STRING
,
385 'title' => ts('Report Instance email Subject') ,
386 'description' => 'Subject of email',
388 'size' => CRM_Utils_Type
::HUGE
,
389 'table_name' => 'civicrm_report_instance',
390 'entity' => 'ReportInstance',
391 'bao' => 'CRM_Report_BAO_ReportInstance',
397 'name' => 'email_to',
398 'type' => CRM_Utils_Type
::T_TEXT
,
399 'title' => ts('Email Report Instance To') ,
400 'description' => 'comma-separated list of email addresses to send the report to',
401 'table_name' => 'civicrm_report_instance',
402 'entity' => 'ReportInstance',
403 'bao' => 'CRM_Report_BAO_ReportInstance',
409 'name' => 'email_cc',
410 'type' => CRM_Utils_Type
::T_TEXT
,
411 'title' => ts('cc Email Report Instance To') ,
412 'description' => 'comma-separated list of email addresses to send the report to',
413 'table_name' => 'civicrm_report_instance',
414 'entity' => 'ReportInstance',
415 'bao' => 'CRM_Report_BAO_ReportInstance',
422 'type' => CRM_Utils_Type
::T_TEXT
,
423 'title' => ts('Report Instance Header') ,
424 'description' => 'comma-separated list of email addresses to send the report to',
427 'table_name' => 'civicrm_report_instance',
428 'entity' => 'ReportInstance',
429 'bao' => 'CRM_Report_BAO_ReportInstance',
431 'type' => 'TextArea',
436 'type' => CRM_Utils_Type
::T_TEXT
,
437 'title' => ts('Report Instance Footer') ,
438 'description' => 'comma-separated list of email addresses to send the report to',
441 'table_name' => 'civicrm_report_instance',
442 'entity' => 'ReportInstance',
443 'bao' => 'CRM_Report_BAO_ReportInstance',
445 'type' => 'TextArea',
448 'navigation_id' => array(
449 'name' => 'navigation_id',
450 'type' => CRM_Utils_Type
::T_INT
,
451 'title' => ts('Navigation ID') ,
452 'description' => 'FK to navigation ID',
454 'where' => 'civicrm_report_instance.navigation_id',
455 'headerPattern' => '',
458 'table_name' => 'civicrm_report_instance',
459 'entity' => 'ReportInstance',
460 'bao' => 'CRM_Report_BAO_ReportInstance',
461 'FKClassName' => 'CRM_Core_DAO_Navigation',
463 'drilldown_id' => array(
464 'name' => 'drilldown_id',
465 'type' => CRM_Utils_Type
::T_INT
,
466 'title' => ts('Drilldown Report ID') ,
467 'description' => 'FK to instance ID drilldown to',
469 'where' => 'civicrm_report_instance.drilldown_id',
470 'headerPattern' => '',
473 'table_name' => 'civicrm_report_instance',
474 'entity' => 'ReportInstance',
475 'bao' => 'CRM_Report_BAO_ReportInstance',
476 'FKClassName' => 'CRM_Report_DAO_ReportInstance',
478 'is_reserved' => array(
479 'name' => 'is_reserved',
480 'type' => CRM_Utils_Type
::T_BOOLEAN
,
481 'title' => ts('Instance is Reserved') ,
482 'table_name' => 'civicrm_report_instance',
483 'entity' => 'ReportInstance',
484 'bao' => 'CRM_Report_BAO_ReportInstance',
486 'type' => 'CheckBox',
490 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
492 return Civi
::$statics[__CLASS__
]['fields'];
495 * Return a mapping from field-name to the corresponding key (as used in fields()).
498 * Array(string $name => string $uniqueName).
500 static function &fieldKeys() {
501 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
502 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
504 return Civi
::$statics[__CLASS__
]['fieldKeys'];
507 * Returns the names of this table
511 static function getTableName() {
512 return self
::$_tableName;
515 * Returns if this table needs to be logged
523 * Returns the list of fields that can be imported
525 * @param bool $prefix
529 static function &import($prefix = false) {
530 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'report_instance', $prefix, array());
534 * Returns the list of fields that can be exported
536 * @param bool $prefix
540 static function &export($prefix = false) {
541 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'report_instance', $prefix, array());