*.bak
backdrop/
bower_components
-CRM/ACL/DAO
-CRM/Activity/DAO
-CRM/Auction/DAO
-CRM/Campaign/DAO
-CRM/Case/DAO
CRM/Case/xml/configuration
-CRM/Contact/DAO/ACLContactCache.php
-CRM/Contact/DAO/Contact.php
-CRM/Contact/DAO/ContactType.php
-CRM/Contact/DAO/DashboardContact.php
-CRM/Contact/DAO/Group.php
-CRM/Contact/DAO/GroupContact.php
-CRM/Contact/DAO/GroupContactCache.php
-CRM/Contact/DAO/GroupNesting.php
-CRM/Contact/DAO/GroupOrganization.php
-CRM/Contact/DAO/Relationship.php
-CRM/Contact/DAO/RelationshipType.php
-CRM/Contact/DAO/SavedSearch.php
-CRM/Contact/DAO/SubscriptionHistory.php
-CRM/Contribute/DAO
CRM/Core/DAO/AllCoreTables.php
CRM/Core/DAO/.listAll.php
CRM/Core/DAO/listAll.php
-CRM/Core/DAO/ActionLog.php
-CRM/Core/DAO/ActionMapping.php
-CRM/Core/DAO/ActionSchedule.php
-CRM/Core/DAO/Address.php
-CRM/Core/DAO/AddressFormat.php
-CRM/Core/DAO/Batch.php
-CRM/Core/DAO/Cache.php
-CRM/Core/DAO/Component.php
-CRM/Core/DAO/Country.php
-CRM/Core/DAO/County.php
-CRM/Core/DAO/Currency.php
-CRM/Core/DAO/CustomField.php
-CRM/Core/DAO/CustomGroup.php
-CRM/Core/DAO/Dashboard.php
-CRM/Core/DAO/Discount.php
-CRM/Core/DAO/Domain.php
-CRM/Core/DAO/Email.php
-CRM/Core/DAO/EntityBatch.php
-CRM/Core/DAO/EntityFile.php
-CRM/Core/DAO/EntityFinancialTrxn.php
-CRM/Core/DAO/EntityTag.php
-CRM/Core/DAO/Extension.php
-CRM/Core/DAO/File.php
-CRM/Core/DAO/FinancialAccount.php
-CRM/Core/DAO/FinancialTrxn.php
-CRM/Core/DAO/IM.php
-CRM/Core/DAO/Job.php
-CRM/Core/DAO/JobLog.php
-CRM/Core/DAO/LineItem.php
-CRM/Core/DAO/LocBlock.php
-CRM/Core/DAO/LocationType.php
-CRM/Core/DAO/Log.php
-CRM/Core/DAO/MailSettings.php
-CRM/Core/DAO/Managed.php
-CRM/Core/DAO/Mapping.php
-CRM/Core/DAO/MappingField.php
-CRM/Core/DAO/Menu.php
-CRM/Core/DAO/MessageTemplate.php
-CRM/Core/DAO/MessageTemplates.php
-CRM/Core/DAO/Navigation.php
-CRM/Core/DAO/Note.php
-CRM/Core/DAO/OpenID.php
-CRM/Core/DAO/OptionGroup.php
-CRM/Core/DAO/OptionValue.php
-CRM/Core/DAO/PaymentProcessor.php
-CRM/Core/DAO/PaymentProcessorType.php
-CRM/Core/DAO/Persistent.php
-CRM/Core/DAO/Phone.php
-CRM/Core/DAO/Preferences.php
-CRM/Core/DAO/PreferencesDate.php
-CRM/Core/DAO/PrevNextCache.php
-CRM/Core/DAO/PriceField.php
-CRM/Core/DAO/PriceSet.php
-CRM/Core/DAO/PriceSetEntity.php
-CRM/Core/DAO/PrintLabel.php
-CRM/Core/DAO/RecurringEntity.php
-CRM/Core/DAO/Setting.php
-CRM/Core/DAO/StateProvince.php
-CRM/Core/DAO/StatusPreference.php
-CRM/Core/DAO/SystemLog.php
-CRM/Core/DAO/Tag.php
-CRM/Core/DAO/Timezone.php
-CRM/Core/DAO/UFField.php
-CRM/Core/DAO/UFGroup.php
-CRM/Core/DAO/UFJoin.php
-CRM/Core/DAO/UFMatch.php
-CRM/Core/DAO/Website.php
-CRM/Core/DAO/WordReplacement.php
-CRM/Core/DAO/Worldregion.php
CRM/Core/I18n/SchemaStructure.php
-CRM/Cxn/DAO
-CRM/Dedupe/DAO
-CRM/Event/Cart/DAO
-CRM/Event/DAO
-CRM/Friend/DAO
-CRM/Grant/DAO
-CRM/Mailing/DAO
-CRM/Mailing/Event/DAO
-CRM/Member/DAO
-CRM/PCP/DAO
-CRM/Pledge/DAO
-CRM/Price/DAO
-CRM/Project/DAO
-CRM/Queue/DAO
-CRM/Report/DAO
-CRM/SMS/DAO
-CRM/Standalone/OpenID/DAO
bin/setup.conf
civicrm-version.php
civicrm-version.txt
tests/phpunit/CiviTest/civicrm.settings.php
tools/stats/config.php
authors.txt
-CRM/Batch/DAO/
-CRM/Financial/DAO/
drupal/
WordPress
joomla
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/ACL/ACL.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:da8f9a821212af54161bf16e46d053c3)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_ACL_DAO_ACL extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_acl';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * ACL Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Is this ACL entry Allow (0) or Deny (1) ?
+ *
+ * @var boolean
+ */
+ public $deny;
+ /**
+ * Table of the object possessing this ACL entry (Contact, Group, or ACL Group)
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * ID of the object possessing this ACL
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * What operation does this ACL entry control?
+ *
+ * @var string
+ */
+ public $operation;
+ /**
+ * The table of the object controlled by this ACL entry
+ *
+ * @var string
+ */
+ public $object_table;
+ /**
+ * The ID of the object controlled by this ACL entry
+ *
+ * @var int unsigned
+ */
+ public $object_id;
+ /**
+ * If this is a grant/revoke entry, what table are we granting?
+ *
+ * @var string
+ */
+ public $acl_table;
+ /**
+ * ID of the ACL or ACL group being granted/revoked
+ *
+ * @var int unsigned
+ */
+ public $acl_id;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_acl
+ */
+ function __construct() {
+ $this->__table = 'civicrm_acl';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL ID') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ACL Name') ,
+ 'description' => 'ACL Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'deny' => array(
+ 'name' => 'deny',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Deny ACL?') ,
+ 'description' => 'Is this ACL entry Allow (0) or Deny (1) ?',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Radio',
+ ) ,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ACL Entity') ,
+ 'description' => 'Table of the object possessing this ACL entry (Contact, Group, or ACL Group)',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'ID of the object possessing this ACL',
+ ) ,
+ 'operation' => array(
+ 'name' => 'operation',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ACL Operation') ,
+ 'description' => 'What operation does this ACL entry control?',
+ 'required' => true,
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_ACL_BAO_ACL::operation',
+ )
+ ) ,
+ 'object_table' => array(
+ 'name' => 'object_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ACL Object') ,
+ 'description' => 'The table of the object controlled by this ACL entry',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'object_id' => array(
+ 'name' => 'object_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL Object ID') ,
+ 'description' => 'The ID of the object controlled by this ACL entry',
+ ) ,
+ 'acl_table' => array(
+ 'name' => 'acl_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ACL Table') ,
+ 'description' => 'If this is a grant/revoke entry, what table are we granting?',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'acl_id' => array(
+ 'name' => 'acl_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL Group ID') ,
+ 'description' => 'ID of the ACL or ACL group being granted/revoked',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('ACL Is Active?') ,
+ 'description' => 'Is this property active?',
+ 'html' => array(
+ 'type' => 'Checkbox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'deny' => 'deny',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'operation' => 'operation',
+ 'object_table' => 'object_table',
+ 'object_id' => 'object_id',
+ 'acl_table' => 'acl_table',
+ 'acl_id' => 'acl_id',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['acl'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['acl'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/ACL/Cache.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:79c0a66cfb8547a17260ab8feaf03ced)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_ACL_DAO_Cache extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_acl_cache';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign Key to Contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Foreign Key to ACL
+ *
+ * @var int unsigned
+ */
+ public $acl_id;
+ /**
+ * When was this cache entry last modified
+ *
+ * @var timestamp
+ */
+ public $modified_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_acl_cache
+ */
+ function __construct() {
+ $this->__table = 'civicrm_acl_cache';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'acl_id', 'civicrm_acl', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Cache ID') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Cache Contact') ,
+ 'description' => 'Foreign Key to Contact',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'acl_id' => array(
+ 'name' => 'acl_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Cache ACL') ,
+ 'description' => 'Foreign Key to ACL',
+ 'required' => true,
+ 'FKClassName' => 'CRM_ACL_DAO_ACL',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Cache Modified Date') ,
+ 'description' => 'When was this cache entry last modified',
+ 'required' => false,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'acl_id' => 'acl_id',
+ 'modified_date' => 'modified_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['acl_cache'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['acl_cache'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/ACL/EntityRole.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0b7f7ad668b304e9a9551e2dc3eec047)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_ACL_DAO_EntityRole extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_acl_entity_role';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)
+ *
+ * @var int unsigned
+ */
+ public $acl_role_id;
+ /**
+ * Table of the object joined to the ACL Role (Contact or Group)
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * ID of the group/contact object being joined
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_acl_entity_role
+ */
+ function __construct() {
+ $this->__table = 'civicrm_acl_entity_role';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity Role') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'acl_role_id' => array(
+ 'name' => 'acl_role_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL Role ID') ,
+ 'description' => 'Foreign Key to ACL Role (which is an option value pair and hence an implicit FK)',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Table of the object joined to the ACL Role (Contact or Group)',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL Entity ID') ,
+ 'description' => 'ID of the group/contact object being joined',
+ 'required' => true,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('ACL Entity Role is Active') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'acl_role_id' => 'acl_role_id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['acl_entity_role'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['acl_entity_role'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Activity/Activity.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c0202859f4e584896c899675c81dc453)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Activity_DAO_Activity extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_activity';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Other Activity ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.
+ *
+ * @var int unsigned
+ */
+ public $source_record_id;
+ /**
+ * FK to civicrm_option_value.id, that has to be valid, registered activity type.
+ *
+ * @var int unsigned
+ */
+ public $activity_type_id;
+ /**
+ * The subject/purpose/short description of the activity.
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.
+ *
+ * @var datetime
+ */
+ public $activity_date_time;
+ /**
+ * Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.
+ *
+ * @var int unsigned
+ */
+ public $duration;
+ /**
+ * Location of the activity (optional, open text).
+ *
+ * @var string
+ */
+ public $location;
+ /**
+ * Phone ID of the number called (optional - used if an existing phone number is selected).
+ *
+ * @var int unsigned
+ */
+ public $phone_id;
+ /**
+ * Phone number in case the number does not exist in the civicrm_phone table.
+ *
+ * @var string
+ */
+ public $phone_number;
+ /**
+ * Details about the activity (agenda, notes, etc).
+ *
+ * @var longtext
+ */
+ public $details;
+ /**
+ * ID of the status this activity is currently in. Foreign key to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * ID of the priority given to this activity. Foreign key to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $priority_id;
+ /**
+ * Parent meeting ID (if this is a follow-up item). This is not currently implemented
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ * Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.
+ *
+ * @var int unsigned
+ */
+ public $medium_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_auto;
+ /**
+ * FK to Relationship ID
+ *
+ * @var int unsigned
+ */
+ public $relationship_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_current_revision;
+ /**
+ * Activity ID of the first activity record in versioning chain.
+ *
+ * @var int unsigned
+ */
+ public $original_id;
+ /**
+ * Currently being used to store result id for survey activity, FK to option value.
+ *
+ * @var string
+ */
+ public $result;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_deleted;
+ /**
+ * The campaign for which this activity has been triggered.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.
+ *
+ * @var int unsigned
+ */
+ public $engagement_level;
+ /**
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * class constructor
+ *
+ * @return civicrm_activity
+ */
+ function __construct() {
+ $this->__table = 'civicrm_activity';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'phone_id', 'civicrm_phone', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_activity', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'relationship_id', 'civicrm_relationship', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'original_id', 'civicrm_activity', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'activity_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity ID') ,
+ 'description' => 'Unique Other Activity ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_activity.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'source_record_id' => array(
+ 'name' => 'source_record_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Source Record') ,
+ 'description' => 'Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.',
+ ) ,
+ 'activity_type_id' => array(
+ 'name' => 'activity_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity Type ID') ,
+ 'description' => 'FK to civicrm_option_value.id, that has to be valid, registered activity type.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_activity.activity_type_id',
+ 'headerPattern' => '/(activity.)?type(.id$)/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'activity_type',
+ 'optionEditPath' => 'civicrm/admin/options/activity_type',
+ )
+ ) ,
+ 'activity_subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Subject') ,
+ 'description' => 'The subject/purpose/short description of the activity.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_activity.subject',
+ 'headerPattern' => '/(activity.)?subject/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'activity_date_time' => array(
+ 'name' => 'activity_date_time',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Activity Date') ,
+ 'description' => 'Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.',
+ 'import' => true,
+ 'where' => 'civicrm_activity.activity_date_time',
+ 'headerPattern' => '/(activity.)?date(.time$)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'activity_duration' => array(
+ 'name' => 'duration',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Duration') ,
+ 'description' => 'Planned or actual duration of activity expressed in minutes. Conglomerate of former duration_hours and duration_minutes.',
+ 'import' => true,
+ 'where' => 'civicrm_activity.duration',
+ 'headerPattern' => '/(activity.)?duration(s)?$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'activity_location' => array(
+ 'name' => 'location',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Location') ,
+ 'description' => 'Location of the activity (optional, open text).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_activity.location',
+ 'headerPattern' => '/(activity.)?location$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'phone_id' => array(
+ 'name' => 'phone_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone (called) ID') ,
+ 'description' => 'Phone ID of the number called (optional - used if an existing phone number is selected).',
+ 'FKClassName' => 'CRM_Core_DAO_Phone',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'phone_number' => array(
+ 'name' => 'phone_number',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Phone (called) Number') ,
+ 'description' => 'Phone number in case the number does not exist in the civicrm_phone table.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'activity_details' => array(
+ 'name' => 'details',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Details') ,
+ 'description' => 'Details about the activity (agenda, notes, etc).',
+ 'import' => true,
+ 'where' => 'civicrm_activity.details',
+ 'headerPattern' => '/(activity.)?detail(s)?$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'activity_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity Status') ,
+ 'description' => 'ID of the status this activity is currently in. Foreign key to civicrm_option_value.',
+ 'import' => true,
+ 'where' => 'civicrm_activity.status_id',
+ 'headerPattern' => '/(activity.)?status(.label$)?/i',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'activity_status',
+ 'optionEditPath' => 'civicrm/admin/options/activity_status',
+ )
+ ) ,
+ 'priority_id' => array(
+ 'name' => 'priority_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Priority') ,
+ 'description' => 'ID of the priority given to this activity. Foreign key to civicrm_option_value.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'priority',
+ 'optionEditPath' => 'civicrm/admin/options/priority',
+ )
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent Activity Id') ,
+ 'description' => 'Parent meeting ID (if this is a follow-up item). This is not currently implemented',
+ 'FKClassName' => 'CRM_Activity_DAO_Activity',
+ ) ,
+ 'activity_is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_activity.is_test',
+ 'headerPattern' => '/(is.)?test(.activity)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'activity_medium_id' => array(
+ 'name' => 'medium_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity Medium') ,
+ 'description' => 'Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'encounter_medium',
+ 'optionEditPath' => 'civicrm/admin/options/encounter_medium',
+ )
+ ) ,
+ 'is_auto' => array(
+ 'name' => 'is_auto',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Auto') ,
+ ) ,
+ 'relationship_id' => array(
+ 'name' => 'relationship_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship Id') ,
+ 'description' => 'FK to Relationship ID',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Contact_DAO_Relationship',
+ ) ,
+ 'is_current_revision' => array(
+ 'name' => 'is_current_revision',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is this activity a current revision in versioning chain?') ,
+ 'import' => true,
+ 'where' => 'civicrm_activity.is_current_revision',
+ 'headerPattern' => '/(is.)?(current.)?(revision|version(ing)?)/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'original_id' => array(
+ 'name' => 'original_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Original Activity ID ') ,
+ 'description' => 'Activity ID of the first activity record in versioning chain.',
+ 'FKClassName' => 'CRM_Activity_DAO_Activity',
+ ) ,
+ 'activity_result' => array(
+ 'name' => 'result',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Result') ,
+ 'description' => 'Currently being used to store result id for survey activity, FK to option value.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'activity_is_deleted' => array(
+ 'name' => 'is_deleted',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Activity is in the Trash') ,
+ 'import' => true,
+ 'where' => 'civicrm_activity.is_deleted',
+ 'headerPattern' => '/(activity.)?(trash|deleted)/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'activity_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this activity has been triggered.',
+ 'import' => true,
+ 'where' => 'civicrm_activity.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'activity_engagement_level' => array(
+ 'name' => 'engagement_level',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Engagement Index') ,
+ 'description' => 'Assign a specific level of engagement to this activity. Used for tracking constituents in ladder of engagement.',
+ 'import' => true,
+ 'where' => 'civicrm_activity.engagement_level',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'engagement_index',
+ 'optionEditPath' => 'civicrm/admin/options/engagement_index',
+ )
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'activity_id',
+ 'source_record_id' => 'source_record_id',
+ 'activity_type_id' => 'activity_type_id',
+ 'subject' => 'activity_subject',
+ 'activity_date_time' => 'activity_date_time',
+ 'duration' => 'activity_duration',
+ 'location' => 'activity_location',
+ 'phone_id' => 'phone_id',
+ 'phone_number' => 'phone_number',
+ 'details' => 'activity_details',
+ 'status_id' => 'activity_status_id',
+ 'priority_id' => 'priority_id',
+ 'parent_id' => 'parent_id',
+ 'is_test' => 'activity_is_test',
+ 'medium_id' => 'activity_medium_id',
+ 'is_auto' => 'is_auto',
+ 'relationship_id' => 'relationship_id',
+ 'is_current_revision' => 'is_current_revision',
+ 'original_id' => 'original_id',
+ 'result' => 'activity_result',
+ 'is_deleted' => 'activity_is_deleted',
+ 'campaign_id' => 'activity_campaign_id',
+ 'engagement_level' => 'activity_engagement_level',
+ 'weight' => 'weight',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['activity'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['activity'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Activity/ActivityContact.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:4c1c80e5eca5463c2fb190d3243a1539)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Activity_DAO_ActivityContact extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_activity_contact';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Activity contact id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign key to the activity for this record.
+ *
+ * @var int unsigned
+ */
+ public $activity_id;
+ /**
+ * Foreign key to the contact for this record.
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Nature of this contact's role in the activity: 1 assignee, 2 creator, 3 focus or target.
+ *
+ * @var int unsigned
+ */
+ public $record_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_activity_contact
+ */
+ function __construct() {
+ $this->__table = 'civicrm_activity_contact';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'activity_id', 'civicrm_activity', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity Contact ID') ,
+ 'description' => 'Activity contact id',
+ 'required' => true,
+ ) ,
+ 'activity_id' => array(
+ 'name' => 'activity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity ID') ,
+ 'description' => 'Foreign key to the activity for this record.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Activity_DAO_Activity',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID (match to contact)') ,
+ 'description' => 'Foreign key to the contact for this record.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_activity_contact.contact_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'record_type_id' => array(
+ 'name' => 'record_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Record Type ID') ,
+ 'description' => 'Nature of this contact\'s role in the activity: 1 assignee, 2 creator, 3 focus or target.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'activity_contacts',
+ 'optionEditPath' => 'civicrm/admin/options/activity_contacts',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'activity_id' => 'activity_id',
+ 'contact_id' => 'contact_id',
+ 'record_type_id' => 'record_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['activity_contact'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['activity_contact'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Batch/Batch.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c2030f71901c97e7914636c6c817beb9)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Batch_DAO_Batch extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_batch';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique Address ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Variable name/programmatic handle for this batch.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Friendly Name.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Description of this batch set.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * When was this item created
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $modified_id;
+ /**
+ * When was this item created
+ *
+ * @var datetime
+ */
+ public $modified_date;
+ /**
+ * FK to Saved Search ID
+ *
+ * @var int unsigned
+ */
+ public $saved_search_id;
+ /**
+ * fk to Batch Status options in civicrm_option_values
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * fk to Batch Type options in civicrm_option_values
+ *
+ * @var int unsigned
+ */
+ public $type_id;
+ /**
+ * fk to Batch mode options in civicrm_option_values
+ *
+ * @var int unsigned
+ */
+ public $mode_id;
+ /**
+ * Total amount for this batch.
+ *
+ * @var float
+ */
+ public $total;
+ /**
+ * Number of items in a batch.
+ *
+ * @var int unsigned
+ */
+ public $item_count;
+ /**
+ * fk to Payment Instrument options in civicrm_option_values
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ *
+ * @var datetime
+ */
+ public $exported_date;
+ /**
+ * cache entered data
+ *
+ * @var longtext
+ */
+ public $data;
+ /**
+ * class constructor
+ *
+ * @return civicrm_batch
+ */
+ function __construct() {
+ $this->__table = 'civicrm_batch';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'modified_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'saved_search_id', 'civicrm_saved_search', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch ID') ,
+ 'description' => 'Unique Address ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Batch Name') ,
+ 'description' => 'Variable name/programmatic handle for this batch.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Batch Title') ,
+ 'description' => 'Friendly Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Batch Description') ,
+ 'description' => 'Description of this batch set.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Created By') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Batch Created Date') ,
+ 'description' => 'When was this item created',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'modified_id' => array(
+ 'name' => 'modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Modified By') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Batch Modified Date') ,
+ 'description' => 'When was this item created',
+ ) ,
+ 'saved_search_id' => array(
+ 'name' => 'saved_search_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Smart Group') ,
+ 'description' => 'FK to Saved Search ID',
+ 'FKClassName' => 'CRM_Contact_DAO_SavedSearch',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Status') ,
+ 'description' => 'fk to Batch Status options in civicrm_option_values',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'batch_status',
+ 'optionEditPath' => 'civicrm/admin/options/batch_status',
+ )
+ ) ,
+ 'type_id' => array(
+ 'name' => 'type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Type') ,
+ 'description' => 'fk to Batch Type options in civicrm_option_values',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'batch_type',
+ 'optionEditPath' => 'civicrm/admin/options/batch_type',
+ )
+ ) ,
+ 'mode_id' => array(
+ 'name' => 'mode_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Mode') ,
+ 'description' => 'fk to Batch mode options in civicrm_option_values',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'batch_mode',
+ 'optionEditPath' => 'civicrm/admin/options/batch_mode',
+ )
+ ) ,
+ 'total' => array(
+ 'name' => 'total',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Batch Total') ,
+ 'description' => 'Total amount for this batch.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'item_count' => array(
+ 'name' => 'item_count',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Number of Items') ,
+ 'description' => 'Number of items in a batch.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch Payment Method') ,
+ 'description' => 'fk to Payment Instrument options in civicrm_option_values',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ 'exported_date' => array(
+ 'name' => 'exported_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Batch Exported Date') ,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Batch Data') ,
+ 'description' => 'cache entered data',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'modified_id' => 'modified_id',
+ 'modified_date' => 'modified_date',
+ 'saved_search_id' => 'saved_search_id',
+ 'status_id' => 'status_id',
+ 'type_id' => 'type_id',
+ 'mode_id' => 'mode_id',
+ 'total' => 'total',
+ 'item_count' => 'item_count',
+ 'payment_instrument_id' => 'payment_instrument_id',
+ 'exported_date' => 'exported_date',
+ 'data' => 'data',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['batch'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['batch'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Batch/EntityBatch.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3532122d86ee946a7af9cc381ee81ea2)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Batch_DAO_EntityBatch extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_entity_batch';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to file, e.g. civicrm_contact
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to civicrm_batch
+ *
+ * @var int unsigned
+ */
+ public $batch_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_entity_batch
+ */
+ function __construct() {
+ $this->__table = 'civicrm_entity_batch';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'batch_id', 'civicrm_batch', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('EntityBatch ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('EntityBatch Table') ,
+ 'description' => 'physical tablename for entity being joined to file, e.g. civicrm_contact',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'batch_id' => array(
+ 'name' => 'batch_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Batch ID') ,
+ 'description' => 'FK to civicrm_batch',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Batch_DAO_Batch',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'batch_id' => 'batch_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['entity_batch'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['entity_batch'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Campaign/Campaign.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0e577c2612bc8ef6e370bf369570b972)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Campaign_DAO_Campaign extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_campaign';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique Campaign ID.
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the Campaign.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Title of the Campaign.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Full description of Campaign.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Date and time that Campaign starts.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * Date and time that Campaign ends.
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type
+ *
+ * @var int unsigned
+ */
+ public $campaign_type_id;
+ /**
+ * Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
+ *
+ * @var string
+ */
+ public $external_identifier;
+ /**
+ * Optional parent id for this Campaign.
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Is this Campaign enabled or disabled/cancelled?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * FK to civicrm_contact, who created this Campaign.
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time that Campaign was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * FK to civicrm_contact, who recently edited this Campaign.
+ *
+ * @var int unsigned
+ */
+ public $last_modified_id;
+ /**
+ * Date and time that Campaign was edited last time.
+ *
+ * @var datetime
+ */
+ public $last_modified_date;
+ /**
+ * General goals for Campaign.
+ *
+ * @var text
+ */
+ public $goal_general;
+ /**
+ * The target revenue for this campaign.
+ *
+ * @var float
+ */
+ public $goal_revenue;
+ /**
+ * class constructor
+ *
+ * @return civicrm_campaign
+ */
+ function __construct() {
+ $this->__table = 'civicrm_campaign';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'last_modified_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign ID') ,
+ 'description' => 'Unique Campaign ID.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_campaign.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Campaign Name') ,
+ 'description' => 'Name of the Campaign.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_campaign.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Campaign Title') ,
+ 'description' => 'Title of the Campaign.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_campaign.title',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Campaign Description') ,
+ 'description' => 'Full description of Campaign.',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Campaign Start Date') ,
+ 'description' => 'Date and time that Campaign starts.',
+ 'import' => true,
+ 'where' => 'civicrm_campaign.start_date',
+ 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Campaign End Date') ,
+ 'description' => 'Date and time that Campaign ends.',
+ 'import' => true,
+ 'where' => 'civicrm_campaign.end_date',
+ 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'campaign_type_id' => array(
+ 'name' => 'campaign_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign Type') ,
+ 'description' => 'Campaign Type ID.Implicit FK to civicrm_option_value where option_group = campaign_type',
+ 'import' => true,
+ 'where' => 'civicrm_campaign.campaign_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'campaign_type',
+ 'optionEditPath' => 'civicrm/admin/options/campaign_type',
+ )
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign Status') ,
+ 'description' => 'Campaign status ID.Implicit FK to civicrm_option_value where option_group = campaign_status',
+ 'import' => true,
+ 'where' => 'civicrm_campaign.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'campaign_status',
+ 'optionEditPath' => 'civicrm/admin/options/campaign_status',
+ )
+ ) ,
+ 'external_identifier' => array(
+ 'name' => 'external_identifier',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Campaign External ID') ,
+ 'description' => 'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'import' => true,
+ 'where' => 'civicrm_campaign.external_identifier',
+ 'headerPattern' => '/external\s?id/i',
+ 'dataPattern' => '/^\d{11,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent Campaign') ,
+ 'description' => 'Optional parent id for this Campaign.',
+ 'import' => true,
+ 'where' => 'civicrm_campaign.parent_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Campaign Active?') ,
+ 'description' => 'Is this Campaign enabled or disabled/cancelled?',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this Campaign.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Campaign Created Date') ,
+ 'description' => 'Date and time that Campaign was created.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'last_modified_id' => array(
+ 'name' => 'last_modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign Modified By') ,
+ 'description' => 'FK to civicrm_contact, who recently edited this Campaign.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'last_modified_date' => array(
+ 'name' => 'last_modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Campaign Modified Date') ,
+ 'description' => 'Date and time that Campaign was edited last time.',
+ ) ,
+ 'goal_general' => array(
+ 'name' => 'goal_general',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Campaign Goals') ,
+ 'description' => 'General goals for Campaign.',
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'goal_revenue' => array(
+ 'name' => 'goal_revenue',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Goal Revenue') ,
+ 'description' => 'The target revenue for this campaign.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ 'campaign_type_id' => 'campaign_type_id',
+ 'status_id' => 'status_id',
+ 'external_identifier' => 'external_identifier',
+ 'parent_id' => 'parent_id',
+ 'is_active' => 'is_active',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'last_modified_id' => 'last_modified_id',
+ 'last_modified_date' => 'last_modified_date',
+ 'goal_general' => 'goal_general',
+ 'goal_revenue' => 'goal_revenue',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['campaign'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['campaign'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Campaign/CampaignGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:ac20636ac67d5046245c9d9f6d68d8a6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Campaign_DAO_CampaignGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_campaign_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Campaign Group id.
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign key to the activity Campaign.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Type of Group.
+ *
+ * @var string
+ */
+ public $group_type;
+ /**
+ * Name of table where item being referenced is stored.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Entity id of referenced table.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_campaign_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_campaign_group';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign Group ID') ,
+ 'description' => 'Campaign Group id.',
+ 'required' => true,
+ ) ,
+ 'campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'Foreign key to the activity Campaign.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'group_type' => array(
+ 'name' => 'group_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Campaign Group Type') ,
+ 'description' => 'Type of Group.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getCampaignGroupTypes',
+ )
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Name of table where item being referenced is stored.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'default' => 'NULL',
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'Entity id of referenced table.',
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'campaign_id' => 'campaign_id',
+ 'group_type' => 'group_type',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['campaign_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['campaign_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Campaign/Survey.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:e82ba586708ff44cb1f1d8bb5fa0d2cd)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Campaign_DAO_Survey extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_survey';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Survey id.
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Title of the Survey.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Foreign key to the Campaign.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Implicit FK to civicrm_option_value where option_group = activity_type
+ *
+ * @var int unsigned
+ */
+ public $activity_type_id;
+ /**
+ * Recontact intervals for each status.
+ *
+ * @var text
+ */
+ public $recontact_interval;
+ /**
+ * Script instructions for volunteers to use for the survey.
+ *
+ * @var text
+ */
+ public $instructions;
+ /**
+ * Number of days for recurrence of release.
+ *
+ * @var int unsigned
+ */
+ public $release_frequency;
+ /**
+ * Maximum number of contacts to allow for survey.
+ *
+ * @var int unsigned
+ */
+ public $max_number_of_contacts;
+ /**
+ * Default number of contacts to allow for survey.
+ *
+ * @var int unsigned
+ */
+ public $default_number_of_contacts;
+ /**
+ * Is this survey enabled or disabled/cancelled?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this default survey?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * FK to civicrm_contact, who created this Survey.
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time that Survey was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * FK to civicrm_contact, who recently edited this Survey.
+ *
+ * @var int unsigned
+ */
+ public $last_modified_id;
+ /**
+ * Date and time that Survey was edited last time.
+ *
+ * @var datetime
+ */
+ public $last_modified_date;
+ /**
+ * Used to store option group id.
+ *
+ * @var int unsigned
+ */
+ public $result_id;
+ /**
+ * Bypass the email verification.
+ *
+ * @var boolean
+ */
+ public $bypass_confirm;
+ /**
+ * Title for Thank-you page (header title tag, and display at the top of the page).
+ *
+ * @var string
+ */
+ public $thankyou_title;
+ /**
+ * text and html allowed. displayed above result on success page
+ *
+ * @var text
+ */
+ public $thankyou_text;
+ /**
+ * Can people share the petition through social media?
+ *
+ * @var boolean
+ */
+ public $is_share;
+ /**
+ * class constructor
+ *
+ * @return civicrm_survey
+ */
+ function __construct() {
+ $this->__table = 'civicrm_survey';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'last_modified_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey ID') ,
+ 'description' => 'Survey id.',
+ 'required' => true,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Survey Title') ,
+ 'description' => 'Title of the Survey.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_survey.title',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey Campaign ID') ,
+ 'description' => 'Foreign key to the Campaign.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'activity_type_id' => array(
+ 'name' => 'activity_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity Type') ,
+ 'description' => 'Implicit FK to civicrm_option_value where option_group = activity_type',
+ 'import' => true,
+ 'where' => 'civicrm_survey.activity_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'activity_type',
+ 'optionEditPath' => 'civicrm/admin/options/activity_type',
+ )
+ ) ,
+ 'recontact_interval' => array(
+ 'name' => 'recontact_interval',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Follow up Interval') ,
+ 'description' => 'Recontact intervals for each status.',
+ 'rows' => 20,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'instructions' => array(
+ 'name' => 'instructions',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Instructions') ,
+ 'description' => 'Script instructions for volunteers to use for the survey.',
+ 'rows' => 20,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'release_frequency' => array(
+ 'name' => 'release_frequency',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey Hold Duration') ,
+ 'description' => 'Number of days for recurrence of release.',
+ 'default' => 'NULL',
+ ) ,
+ 'max_number_of_contacts' => array(
+ 'name' => 'max_number_of_contacts',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum number of contacts') ,
+ 'description' => 'Maximum number of contacts to allow for survey.',
+ 'default' => 'NULL',
+ ) ,
+ 'default_number_of_contacts' => array(
+ 'name' => 'default_number_of_contacts',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Default number of contacts') ,
+ 'description' => 'Default number of contacts to allow for survey.',
+ 'default' => 'NULL',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Survey Is Active') ,
+ 'description' => 'Is this survey enabled or disabled/cancelled?',
+ 'default' => '1',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Default Survey') ,
+ 'description' => 'Is this default survey?',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this Survey.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Campaign Created Date') ,
+ 'description' => 'Date and time that Survey was created.',
+ ) ,
+ 'last_modified_id' => array(
+ 'name' => 'last_modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey Modified') ,
+ 'description' => 'FK to civicrm_contact, who recently edited this Survey.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'last_modified_date' => array(
+ 'name' => 'last_modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Survey Modified On') ,
+ 'description' => 'Date and time that Survey was edited last time.',
+ ) ,
+ 'result_id' => array(
+ 'name' => 'result_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Survey Result') ,
+ 'description' => 'Used to store option group id.',
+ 'default' => 'NULL',
+ ) ,
+ 'bypass_confirm' => array(
+ 'name' => 'bypass_confirm',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('No Email Verification') ,
+ 'description' => 'Bypass the email verification.',
+ ) ,
+ 'thankyou_title' => array(
+ 'name' => 'thankyou_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Thank-you Title') ,
+ 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'thankyou_text' => array(
+ 'name' => 'thankyou_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Thank-you Text') ,
+ 'description' => 'text and html allowed. displayed above result on success page',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_share' => array(
+ 'name' => 'is_share',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is shared through social media') ,
+ 'description' => 'Can people share the petition through social media?',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'title' => 'title',
+ 'campaign_id' => 'campaign_id',
+ 'activity_type_id' => 'activity_type_id',
+ 'recontact_interval' => 'recontact_interval',
+ 'instructions' => 'instructions',
+ 'release_frequency' => 'release_frequency',
+ 'max_number_of_contacts' => 'max_number_of_contacts',
+ 'default_number_of_contacts' => 'default_number_of_contacts',
+ 'is_active' => 'is_active',
+ 'is_default' => 'is_default',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'last_modified_id' => 'last_modified_id',
+ 'last_modified_date' => 'last_modified_date',
+ 'result_id' => 'result_id',
+ 'bypass_confirm' => 'bypass_confirm',
+ 'thankyou_title' => 'thankyou_title',
+ 'thankyou_text' => 'thankyou_text',
+ 'is_share' => 'is_share',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['survey'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['survey'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Case/Case.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3c6e5bb0570f71e885edfdfbf8bd39dd)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Case_DAO_Case extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_case';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Case ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_case_type.id
+ *
+ * @var int unsigned
+ */
+ public $case_type_id;
+ /**
+ * Short name of the case.
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Date on which given case starts.
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * Date on which given case ends.
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ * Details about the meeting (agenda, notes, etc).
+ *
+ * @var text
+ */
+ public $details;
+ /**
+ * Id of case status.
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_deleted;
+ /**
+ * class constructor
+ *
+ * @return civicrm_case
+ */
+ function __construct() {
+ $this->__table = 'civicrm_case';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'case_type_id', 'civicrm_case_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'case_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case ID') ,
+ 'description' => 'Unique Case ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_case.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'case_type_id' => array(
+ 'name' => 'case_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case Type') ,
+ 'description' => 'FK to civicrm_case_type.id',
+ 'import' => true,
+ 'where' => 'civicrm_case.case_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'FKClassName' => 'CRM_Case_DAO_CaseType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_case_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'case_subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Case Subject') ,
+ 'description' => 'Short name of the case.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_case.subject',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'case_start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Case Start Date') ,
+ 'description' => 'Date on which given case starts.',
+ 'import' => true,
+ 'where' => 'civicrm_case.start_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'case_end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Case End Date') ,
+ 'description' => 'Date on which given case ends.',
+ 'import' => true,
+ 'where' => 'civicrm_case.end_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'details' => array(
+ 'name' => 'details',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Details') ,
+ 'description' => 'Details about the meeting (agenda, notes, etc).',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'case_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case Status') ,
+ 'description' => 'Id of case status.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_case.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'case_status',
+ 'optionEditPath' => 'civicrm/admin/options/case_status',
+ )
+ ) ,
+ 'case_deleted' => array(
+ 'name' => 'is_deleted',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Case is in the Trash') ,
+ 'import' => true,
+ 'where' => 'civicrm_case.is_deleted',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'case_id',
+ 'case_type_id' => 'case_type_id',
+ 'subject' => 'case_subject',
+ 'start_date' => 'case_start_date',
+ 'end_date' => 'case_end_date',
+ 'details' => 'details',
+ 'status_id' => 'case_status_id',
+ 'is_deleted' => 'case_deleted',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['case'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['case'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Case/CaseActivity.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:50a9f27537140c63f630d1925db35176)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Case_DAO_CaseActivity extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_case_activity';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique case-activity association id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Case ID of case-activity association.
+ *
+ * @var int unsigned
+ */
+ public $case_id;
+ /**
+ * Activity ID of case-activity association.
+ *
+ * @var int unsigned
+ */
+ public $activity_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_case_activity
+ */
+ function __construct() {
+ $this->__table = 'civicrm_case_activity';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'case_id', 'civicrm_case', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'activity_id', 'civicrm_activity', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case Activity ID') ,
+ 'description' => 'Unique case-activity association id',
+ 'required' => true,
+ ) ,
+ 'case_id' => array(
+ 'name' => 'case_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case') ,
+ 'description' => 'Case ID of case-activity association.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Case_DAO_Case',
+ ) ,
+ 'activity_id' => array(
+ 'name' => 'activity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Activity ID') ,
+ 'description' => 'Activity ID of case-activity association.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Activity_DAO_Activity',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'case_id' => 'case_id',
+ 'activity_id' => 'activity_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['case_activity'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['case_activity'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Case/CaseContact.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:d4d9b2b55a37fb1c93ea4bd836be63fc)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Case_DAO_CaseContact extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_case_contact';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique case-contact association id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Case ID of case-contact association.
+ *
+ * @var int unsigned
+ */
+ public $case_id;
+ /**
+ * Contact ID of contact record given case belongs to.
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_case_contact
+ */
+ function __construct() {
+ $this->__table = 'civicrm_case_contact';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'case_id', 'civicrm_case', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case Contact ID') ,
+ 'description' => 'Unique case-contact association id',
+ 'required' => true,
+ ) ,
+ 'case_id' => array(
+ 'name' => 'case_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case') ,
+ 'description' => 'Case ID of case-contact association.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Case_DAO_Case',
+ ) ,
+ 'case_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Contact ID of contact record given case belongs to.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'case_id' => 'case_id',
+ 'contact_id' => 'case_contact_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['case_contact'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['case_contact'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Case/CaseType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:4cce36465cbe6eb544212033d1ff285d)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Case_DAO_CaseType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_case_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Autoincremented type id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Machine name for Case Type
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Natural language name for Case Type
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Description of the Case Type
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Is this entry active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this case type a predefined system type?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Ordering of the case types
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * xml definition of case type
+ *
+ * @var blob
+ */
+ public $definition;
+ /**
+ * class constructor
+ *
+ * @return civicrm_case_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_case_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Case Type ID') ,
+ 'description' => 'Autoincremented type id',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Case Type Name') ,
+ 'description' => 'Machine name for Case Type',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Case Type Title') ,
+ 'description' => 'Natural language name for Case Type',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Case Type Description') ,
+ 'description' => 'Description of the Case Type',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Case Type Is Active') ,
+ 'description' => 'Is this entry active?',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Case Type Is Reserved') ,
+ 'description' => 'Is this case type a predefined system type?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Ordering of the case types',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'definition' => array(
+ 'name' => 'definition',
+ 'type' => CRM_Utils_Type::T_BLOB,
+ 'title' => ts('Case Type Definition') ,
+ 'description' => 'xml definition of case type',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'is_active' => 'is_active',
+ 'is_reserved' => 'is_reserved',
+ 'weight' => 'weight',
+ 'definition' => 'definition',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['case_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['case_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/ACLContactCache.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:68bf4698d0a04526a88a8d8140af4b04)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_ACLContactCache extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_acl_contact_cache';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_contact (could be null for anon user)
+ *
+ * @var int unsigned
+ */
+ public $user_id;
+ /**
+ * FK to civicrm_contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * What operation does this user have permission on?
+ *
+ * @var string
+ */
+ public $operation;
+ /**
+ * class constructor
+ *
+ * @return civicrm_acl_contact_cache
+ */
+ function __construct() {
+ $this->__table = 'civicrm_acl_contact_cache';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'user_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ACL Contact Cache ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'user_id' => array(
+ 'name' => 'user_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to civicrm_contact (could be null for anon user)',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to civicrm_contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'operation' => array(
+ 'name' => 'operation',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Operation') ,
+ 'description' => 'What operation does this user have permission on?',
+ 'required' => true,
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_ACL_BAO_ACL::operation',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'user_id' => 'user_id',
+ 'contact_id' => 'contact_id',
+ 'operation' => 'operation',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['acl_contact_cache'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['acl_contact_cache'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/Contact.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:684d2dad31a91084502fb8edb6e891bc)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_Contact extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contact';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Contact ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Type of Contact.
+ *
+ * @var string
+ */
+ public $contact_type;
+ /**
+ * May be used to over-ride contact view and edit templates.
+ *
+ * @var string
+ */
+ public $contact_sub_type;
+ /**
+ *
+ * @var boolean
+ */
+ public $do_not_email;
+ /**
+ *
+ * @var boolean
+ */
+ public $do_not_phone;
+ /**
+ *
+ * @var boolean
+ */
+ public $do_not_mail;
+ /**
+ *
+ * @var boolean
+ */
+ public $do_not_sms;
+ /**
+ *
+ * @var boolean
+ */
+ public $do_not_trade;
+ /**
+ * Has the contact opted out from receiving all bulk email from the organization or site domain?
+ *
+ * @var boolean
+ */
+ public $is_opt_out;
+ /**
+ * May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
+ *
+ * @var string
+ */
+ public $legal_identifier;
+ /**
+ * Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.
+ *
+ * @var string
+ */
+ public $external_identifier;
+ /**
+ * Name used for sorting different contact types
+ *
+ * @var string
+ */
+ public $sort_name;
+ /**
+ * Formatted name representing preferred format for display/print/other output.
+ *
+ * @var string
+ */
+ public $display_name;
+ /**
+ * Nickname.
+ *
+ * @var string
+ */
+ public $nick_name;
+ /**
+ * Legal Name.
+ *
+ * @var string
+ */
+ public $legal_name;
+ /**
+ * optional URL for preferred image (photo, logo, etc.) to display for this contact.
+ *
+ * @var text
+ */
+ public $image_URL;
+ /**
+ * What is the preferred mode of communication.
+ *
+ * @var string
+ */
+ public $preferred_communication_method;
+ /**
+ * Which language is preferred for communication. FK to languages in civicrm_option_value.
+ *
+ * @var string
+ */
+ public $preferred_language;
+ /**
+ * What is the preferred mode of sending an email.
+ *
+ * @var string
+ */
+ public $preferred_mail_format;
+ /**
+ * Key for validating requests related to this contact.
+ *
+ * @var string
+ */
+ public $hash;
+ /**
+ * API Key for validating requests related to this contact.
+ *
+ * @var string
+ */
+ public $api_key;
+ /**
+ * where contact come from, e.g. import, donate module insert...
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ * First Name.
+ *
+ * @var string
+ */
+ public $first_name;
+ /**
+ * Middle Name.
+ *
+ * @var string
+ */
+ public $middle_name;
+ /**
+ * Last Name.
+ *
+ * @var string
+ */
+ public $last_name;
+ /**
+ * Prefix or Title for name (Ms, Mr...). FK to prefix ID
+ *
+ * @var int unsigned
+ */
+ public $prefix_id;
+ /**
+ * Suffix for name (Jr, Sr...). FK to suffix ID
+ *
+ * @var int unsigned
+ */
+ public $suffix_id;
+ /**
+ * Formal (academic or similar) title in front of name. (Prof., Dr. etc.)
+ *
+ * @var string
+ */
+ public $formal_title;
+ /**
+ * Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $communication_style_id;
+ /**
+ * FK to civicrm_option_value.id, that has to be valid registered Email Greeting.
+ *
+ * @var int unsigned
+ */
+ public $email_greeting_id;
+ /**
+ * Custom Email Greeting.
+ *
+ * @var string
+ */
+ public $email_greeting_custom;
+ /**
+ * Cache Email Greeting.
+ *
+ * @var string
+ */
+ public $email_greeting_display;
+ /**
+ * FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.
+ *
+ * @var int unsigned
+ */
+ public $postal_greeting_id;
+ /**
+ * Custom Postal greeting.
+ *
+ * @var string
+ */
+ public $postal_greeting_custom;
+ /**
+ * Cache Postal greeting.
+ *
+ * @var string
+ */
+ public $postal_greeting_display;
+ /**
+ * FK to civicrm_option_value.id, that has to be valid registered Addressee.
+ *
+ * @var int unsigned
+ */
+ public $addressee_id;
+ /**
+ * Custom Addressee.
+ *
+ * @var string
+ */
+ public $addressee_custom;
+ /**
+ * Cache Addressee.
+ *
+ * @var string
+ */
+ public $addressee_display;
+ /**
+ * Job Title
+ *
+ * @var string
+ */
+ public $job_title;
+ /**
+ * FK to gender ID
+ *
+ * @var int unsigned
+ */
+ public $gender_id;
+ /**
+ * Date of birth
+ *
+ * @var date
+ */
+ public $birth_date;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_deceased;
+ /**
+ * Date of deceased
+ *
+ * @var date
+ */
+ public $deceased_date;
+ /**
+ * Household Name.
+ *
+ * @var string
+ */
+ public $household_name;
+ /**
+ * Optional FK to Primary Contact for this household.
+ *
+ * @var int unsigned
+ */
+ public $primary_contact_id;
+ /**
+ * Organization Name.
+ *
+ * @var string
+ */
+ public $organization_name;
+ /**
+ * Standard Industry Classification Code.
+ *
+ * @var string
+ */
+ public $sic_code;
+ /**
+ * the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
+ *
+ * @var string
+ */
+ public $user_unique_id;
+ /**
+ * OPTIONAL FK to civicrm_contact record.
+ *
+ * @var int unsigned
+ */
+ public $employer_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_deleted;
+ /**
+ * When was the contact was created.
+ *
+ * @var timestamp
+ */
+ public $created_date;
+ /**
+ * When was the contact (or closely related entity) was created or modified or deleted.
+ *
+ * @var timestamp
+ */
+ public $modified_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contact
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contact';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'primary_contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'employer_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Unique Contact ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contact.id',
+ 'headerPattern' => '/internal|contact?|id$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'contact_type' => array(
+ 'name' => 'contact_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type') ,
+ 'description' => 'Type of Contact.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'export' => true,
+ 'where' => 'civicrm_contact.contact_type',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NULL',
+ )
+ ) ,
+ 'contact_sub_type' => array(
+ 'name' => 'contact_sub_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Subtype') ,
+ 'description' => 'May be used to over-ride contact view and edit templates.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.contact_sub_type',
+ 'headerPattern' => '/C(ontact )?(subtype|sub-type|sub type)/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NOT NULL',
+ )
+ ) ,
+ 'do_not_email' => array(
+ 'name' => 'do_not_email',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Do Not Email') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.do_not_email',
+ 'headerPattern' => '/d(o )?(not )?(email)/i',
+ 'dataPattern' => '/^\d{1,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'do_not_phone' => array(
+ 'name' => 'do_not_phone',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Do Not Phone') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.do_not_phone',
+ 'headerPattern' => '/d(o )?(not )?(call|phone)/i',
+ 'dataPattern' => '/^\d{1,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'do_not_mail' => array(
+ 'name' => 'do_not_mail',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Do Not Mail') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.do_not_mail',
+ 'headerPattern' => '/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i',
+ 'dataPattern' => '/^\d{1,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'do_not_sms' => array(
+ 'name' => 'do_not_sms',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Do Not Sms') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.do_not_sms',
+ 'headerPattern' => '/d(o )?(not )?(sms)/i',
+ 'dataPattern' => '/^\d{1,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'do_not_trade' => array(
+ 'name' => 'do_not_trade',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Do Not Trade') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.do_not_trade',
+ 'headerPattern' => '/d(o )?(not )?(trade)/i',
+ 'dataPattern' => '/^\d{1,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_opt_out' => array(
+ 'name' => 'is_opt_out',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('No Bulk Emails (User Opt Out)') ,
+ 'description' => 'Has the contact opted out from receiving all bulk email from the organization or site domain?',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contact.is_opt_out',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'legal_identifier' => array(
+ 'name' => 'legal_identifier',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Legal Identifier') ,
+ 'description' => 'May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.
+ ',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'import' => true,
+ 'where' => 'civicrm_contact.legal_identifier',
+ 'headerPattern' => '/legal\s?id/i',
+ 'dataPattern' => '/\w+?\d{5,}/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'external_identifier' => array(
+ 'name' => 'external_identifier',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('External Identifier') ,
+ 'description' => 'Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.',
+ 'maxlength' => 64,
+ 'size' => 8,
+ 'import' => true,
+ 'where' => 'civicrm_contact.external_identifier',
+ 'headerPattern' => '/external\s?id/i',
+ 'dataPattern' => '/^\d{11,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'sort_name' => array(
+ 'name' => 'sort_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Sort Name') ,
+ 'description' => 'Name used for sorting different contact types',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'export' => true,
+ 'where' => 'civicrm_contact.sort_name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'display_name' => array(
+ 'name' => 'display_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Display Name') ,
+ 'description' => 'Formatted name representing preferred format for display/print/other output.',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'export' => true,
+ 'where' => 'civicrm_contact.display_name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'nick_name' => array(
+ 'name' => 'nick_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Nickname') ,
+ 'description' => 'Nickname.',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.nick_name',
+ 'headerPattern' => '/n(ick\s)name|nick$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'legal_name' => array(
+ 'name' => 'legal_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Legal Name') ,
+ 'description' => 'Legal Name.',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.legal_name',
+ 'headerPattern' => '/^legal|(l(egal\s)?name)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'image_URL' => array(
+ 'name' => 'image_URL',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Image Url') ,
+ 'description' => 'optional URL for preferred image (photo, logo, etc.) to display for this contact.',
+ 'import' => true,
+ 'where' => 'civicrm_contact.image_URL',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'File',
+ ) ,
+ ) ,
+ 'preferred_communication_method' => array(
+ 'name' => 'preferred_communication_method',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Preferred Communication Method') ,
+ 'description' => 'What is the preferred mode of communication.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.preferred_communication_method',
+ 'headerPattern' => '/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'preferred_communication_method',
+ 'optionEditPath' => 'civicrm/admin/options/preferred_communication_method',
+ )
+ ) ,
+ 'preferred_language' => array(
+ 'name' => 'preferred_language',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Preferred Language') ,
+ 'description' => 'Which language is preferred for communication. FK to languages in civicrm_option_value.',
+ 'maxlength' => 5,
+ 'size' => CRM_Utils_Type::SIX,
+ 'import' => true,
+ 'where' => 'civicrm_contact.preferred_language',
+ 'headerPattern' => '/^lang/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'languages',
+ 'keyColumn' => 'name',
+ 'optionEditPath' => 'civicrm/admin/options/languages',
+ )
+ ) ,
+ 'preferred_mail_format' => array(
+ 'name' => 'preferred_mail_format',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Preferred Mail Format') ,
+ 'description' => 'What is the preferred mode of sending an email.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'import' => true,
+ 'where' => 'civicrm_contact.preferred_mail_format',
+ 'headerPattern' => '/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'Both',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::pmf',
+ )
+ ) ,
+ 'hash' => array(
+ 'name' => 'hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Hash') ,
+ 'description' => 'Key for validating requests related to this contact.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'export' => true,
+ 'where' => 'civicrm_contact.hash',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'api_key' => array(
+ 'name' => 'api_key',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Api Key') ,
+ 'description' => 'API Key for validating requests related to this contact.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'contact_source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Source') ,
+ 'description' => 'where contact come from, e.g. import, donate module insert...',
+ 'maxlength' => 255,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.source',
+ 'headerPattern' => '/(C(ontact\s)?Source)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'first_name' => array(
+ 'name' => 'first_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('First Name') ,
+ 'description' => 'First Name.',
+ 'maxlength' => 64,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.first_name',
+ 'headerPattern' => '/^first|(f(irst\s)?name)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'middle_name' => array(
+ 'name' => 'middle_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Middle Name') ,
+ 'description' => 'Middle Name.',
+ 'maxlength' => 64,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.middle_name',
+ 'headerPattern' => '/^middle|(m(iddle\s)?name)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'last_name' => array(
+ 'name' => 'last_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Last Name') ,
+ 'description' => 'Last Name.',
+ 'maxlength' => 64,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.last_name',
+ 'headerPattern' => '/^last|(l(ast\s)?name)$/i',
+ 'dataPattern' => '/^\w+(\s\w+)?+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'prefix_id' => array(
+ 'name' => 'prefix_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Individual Prefix') ,
+ 'description' => 'Prefix or Title for name (Ms, Mr...). FK to prefix ID',
+ 'import' => true,
+ 'where' => 'civicrm_contact.prefix_id',
+ 'headerPattern' => '/^(prefix|title)/i',
+ 'dataPattern' => '/^(mr|ms|mrs|sir|dr)\.?$/i',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'individual_prefix',
+ 'optionEditPath' => 'civicrm/admin/options/individual_prefix',
+ )
+ ) ,
+ 'suffix_id' => array(
+ 'name' => 'suffix_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Individual Suffix') ,
+ 'description' => 'Suffix for name (Jr, Sr...). FK to suffix ID',
+ 'import' => true,
+ 'where' => 'civicrm_contact.suffix_id',
+ 'headerPattern' => '/^suffix$/i',
+ 'dataPattern' => '/^(sr|jr)\.?|i{2,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'individual_suffix',
+ 'optionEditPath' => 'civicrm/admin/options/individual_suffix',
+ )
+ ) ,
+ 'formal_title' => array(
+ 'name' => 'formal_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Formal Title') ,
+ 'description' => 'Formal (academic or similar) title in front of name. (Prof., Dr. etc.)',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_contact.formal_title',
+ 'headerPattern' => '/^title/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'communication_style_id' => array(
+ 'name' => 'communication_style_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Communication Style') ,
+ 'description' => 'Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.',
+ 'export' => true,
+ 'where' => 'civicrm_contact.communication_style_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'communication_style',
+ 'optionEditPath' => 'civicrm/admin/options/communication_style',
+ )
+ ) ,
+ 'email_greeting_id' => array(
+ 'name' => 'email_greeting_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email Greeting ID') ,
+ 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Email Greeting.',
+ ) ,
+ 'email_greeting_custom' => array(
+ 'name' => 'email_greeting_custom',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Email Greeting Custom') ,
+ 'description' => 'Custom Email Greeting.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.email_greeting_custom',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'email_greeting_display' => array(
+ 'name' => 'email_greeting_display',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Email Greeting') ,
+ 'description' => 'Cache Email Greeting.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'postal_greeting_id' => array(
+ 'name' => 'postal_greeting_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Postal Greeting ID') ,
+ 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'postal_greeting_custom' => array(
+ 'name' => 'postal_greeting_custom',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Postal Greeting Custom') ,
+ 'description' => 'Custom Postal greeting.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.postal_greeting_custom',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'postal_greeting_display' => array(
+ 'name' => 'postal_greeting_display',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Postal Greeting') ,
+ 'description' => 'Cache Postal greeting.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'addressee_id' => array(
+ 'name' => 'addressee_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Addressee ID') ,
+ 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Addressee.',
+ ) ,
+ 'addressee_custom' => array(
+ 'name' => 'addressee_custom',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Addressee Custom') ,
+ 'description' => 'Custom Addressee.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.addressee_custom',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'addressee_display' => array(
+ 'name' => 'addressee_display',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Addressee') ,
+ 'description' => 'Cache Addressee.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'job_title' => array(
+ 'name' => 'job_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Job Title') ,
+ 'description' => 'Job Title',
+ 'maxlength' => 255,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.job_title',
+ 'headerPattern' => '/^job|(j(ob\s)?title)$/i',
+ 'dataPattern' => '//',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'gender_id' => array(
+ 'name' => 'gender_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Gender') ,
+ 'description' => 'FK to gender ID',
+ 'import' => true,
+ 'where' => 'civicrm_contact.gender_id',
+ 'headerPattern' => '/^gender$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'gender',
+ 'optionEditPath' => 'civicrm/admin/options/gender',
+ )
+ ) ,
+ 'birth_date' => array(
+ 'name' => 'birth_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Birth Date') ,
+ 'description' => 'Date of birth',
+ 'import' => true,
+ 'where' => 'civicrm_contact.birth_date',
+ 'headerPattern' => '/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i',
+ 'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'is_deceased' => array(
+ 'name' => 'is_deceased',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Deceased') ,
+ 'import' => true,
+ 'where' => 'civicrm_contact.is_deceased',
+ 'headerPattern' => '/i(s\s)?d(eceased)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'deceased_date' => array(
+ 'name' => 'deceased_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Deceased Date') ,
+ 'description' => 'Date of deceased',
+ 'import' => true,
+ 'where' => 'civicrm_contact.deceased_date',
+ 'headerPattern' => '/^deceased|(d(eceased\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'household_name' => array(
+ 'name' => 'household_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Household Name') ,
+ 'description' => 'Household Name.',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.household_name',
+ 'headerPattern' => '/^household|(h(ousehold\s)?name)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'primary_contact_id' => array(
+ 'name' => 'primary_contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Household Primary Contact ID') ,
+ 'description' => 'Optional FK to Primary Contact for this household.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'organization_name' => array(
+ 'name' => 'organization_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Organization Name') ,
+ 'description' => 'Organization Name.',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.organization_name',
+ 'headerPattern' => '/^organization|(o(rganization\s)?name)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'sic_code' => array(
+ 'name' => 'sic_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Sic Code') ,
+ 'description' => 'Standard Industry Classification Code.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'import' => true,
+ 'where' => 'civicrm_contact.sic_code',
+ 'headerPattern' => '/^sic|(s(ic\s)?code)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'user_unique_id' => array(
+ 'name' => 'user_unique_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Unique ID (OpenID)') ,
+ 'description' => 'the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contact.user_unique_id',
+ 'headerPattern' => '/^Open\s?ID|u(niq\w*)?\s?ID/i',
+ 'dataPattern' => '/^[\w\/\:\.]+$/',
+ 'export' => true,
+ 'rule' => 'url',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'current_employer_id' => array(
+ 'name' => 'employer_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Current Employer') ,
+ 'description' => 'OPTIONAL FK to civicrm_contact record.',
+ 'export' => true,
+ 'where' => 'civicrm_contact.employer_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'contact_is_deleted' => array(
+ 'name' => 'is_deleted',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Contact is in Trash') ,
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_contact.is_deleted',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Created Date') ,
+ 'description' => 'When was the contact was created.',
+ 'required' => false,
+ 'export' => true,
+ 'where' => 'civicrm_contact.created_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'default' => 'NULL',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Modified Date') ,
+ 'description' => 'When was the contact (or closely related entity) was created or modified or deleted.',
+ 'required' => false,
+ 'export' => true,
+ 'where' => 'civicrm_contact.modified_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_type' => 'contact_type',
+ 'contact_sub_type' => 'contact_sub_type',
+ 'do_not_email' => 'do_not_email',
+ 'do_not_phone' => 'do_not_phone',
+ 'do_not_mail' => 'do_not_mail',
+ 'do_not_sms' => 'do_not_sms',
+ 'do_not_trade' => 'do_not_trade',
+ 'is_opt_out' => 'is_opt_out',
+ 'legal_identifier' => 'legal_identifier',
+ 'external_identifier' => 'external_identifier',
+ 'sort_name' => 'sort_name',
+ 'display_name' => 'display_name',
+ 'nick_name' => 'nick_name',
+ 'legal_name' => 'legal_name',
+ 'image_URL' => 'image_URL',
+ 'preferred_communication_method' => 'preferred_communication_method',
+ 'preferred_language' => 'preferred_language',
+ 'preferred_mail_format' => 'preferred_mail_format',
+ 'hash' => 'hash',
+ 'api_key' => 'api_key',
+ 'source' => 'contact_source',
+ 'first_name' => 'first_name',
+ 'middle_name' => 'middle_name',
+ 'last_name' => 'last_name',
+ 'prefix_id' => 'prefix_id',
+ 'suffix_id' => 'suffix_id',
+ 'formal_title' => 'formal_title',
+ 'communication_style_id' => 'communication_style_id',
+ 'email_greeting_id' => 'email_greeting_id',
+ 'email_greeting_custom' => 'email_greeting_custom',
+ 'email_greeting_display' => 'email_greeting_display',
+ 'postal_greeting_id' => 'postal_greeting_id',
+ 'postal_greeting_custom' => 'postal_greeting_custom',
+ 'postal_greeting_display' => 'postal_greeting_display',
+ 'addressee_id' => 'addressee_id',
+ 'addressee_custom' => 'addressee_custom',
+ 'addressee_display' => 'addressee_display',
+ 'job_title' => 'job_title',
+ 'gender_id' => 'gender_id',
+ 'birth_date' => 'birth_date',
+ 'is_deceased' => 'is_deceased',
+ 'deceased_date' => 'deceased_date',
+ 'household_name' => 'household_name',
+ 'primary_contact_id' => 'primary_contact_id',
+ 'organization_name' => 'organization_name',
+ 'sic_code' => 'sic_code',
+ 'user_unique_id' => 'user_unique_id',
+ 'employer_id' => 'current_employer_id',
+ 'is_deleted' => 'contact_is_deleted',
+ 'created_date' => 'created_date',
+ 'modified_date' => 'modified_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contact'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contact'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/ContactType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b418df428eee821e1812bf0894abebac)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_ContactType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contact_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Contact Type ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Internal name of Contact Type (or Subtype).
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * localized Name of Contact Type.
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * localized Optional verbose description of the type.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * URL of image if any.
+ *
+ * @var string
+ */
+ public $image_URL;
+ /**
+ * Optional FK to parent contact type.
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Is this entry active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this contact type a predefined system type
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contact_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contact_type';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_contact_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact Type ID') ,
+ 'description' => 'Contact Type ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Internal name of Contact Type (or Subtype).',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type Label') ,
+ 'description' => 'localized Name of Contact Type.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Contact Type Description') ,
+ 'description' => 'localized Optional verbose description of the type.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'image_URL' => array(
+ 'name' => 'image_URL',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type Image URL') ,
+ 'description' => 'URL of image if any.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact Type Parent') ,
+ 'description' => 'Optional FK to parent contact type.',
+ 'FKClassName' => 'CRM_Contact_DAO_ContactType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NULL',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Contact Type Is Active?') ,
+ 'description' => 'Is this entry active?',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Contact Type is Reserved?') ,
+ 'description' => 'Is this contact type a predefined system type',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'description' => 'description',
+ 'image_URL' => 'image_URL',
+ 'parent_id' => 'parent_id',
+ 'is_active' => 'is_active',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contact_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contact_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/DashboardContact.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:886461f804207e59584180d503fb79a6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_DashboardContact extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_dashboard_contact';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Dashboard ID
+ *
+ * @var int unsigned
+ */
+ public $dashboard_id;
+ /**
+ * Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * column no for this widget
+ *
+ * @var boolean
+ */
+ public $column_no;
+ /**
+ * Is Minimized?
+ *
+ * @var boolean
+ */
+ public $is_minimized;
+ /**
+ * Is Fullscreen?
+ *
+ * @var boolean
+ */
+ public $is_fullscreen;
+ /**
+ * Is this widget active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Ordering of the widgets.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * dashlet content
+ *
+ * @var longtext
+ */
+ public $content;
+ /**
+ * When was content populated
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_dashboard_contact
+ */
+ function __construct() {
+ $this->__table = 'civicrm_dashboard_contact';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dashboard_id', 'civicrm_dashboard', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dashboard Contact ID') ,
+ 'required' => true,
+ ) ,
+ 'dashboard_id' => array(
+ 'name' => 'dashboard_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dashboard') ,
+ 'description' => 'Dashboard ID',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Dashboard',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dashboard Contact') ,
+ 'description' => 'Contact ID',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'column_no' => array(
+ 'name' => 'column_no',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Column No') ,
+ 'description' => 'column no for this widget',
+ ) ,
+ 'is_minimized' => array(
+ 'name' => 'is_minimized',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Dashlet is Minimized?') ,
+ 'description' => 'Is Minimized?',
+ ) ,
+ 'is_fullscreen' => array(
+ 'name' => 'is_fullscreen',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Dashlet is FullScreen?') ,
+ 'description' => 'Is Fullscreen?',
+ 'default' => '1',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Dashlet is Active?') ,
+ 'description' => 'Is this widget active?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Ordering of the widgets.',
+ ) ,
+ 'content' => array(
+ 'name' => 'content',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Content') ,
+ 'description' => 'dashlet content',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Dashlet Created On') ,
+ 'description' => 'When was content populated',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'dashboard_id' => 'dashboard_id',
+ 'contact_id' => 'contact_id',
+ 'column_no' => 'column_no',
+ 'is_minimized' => 'is_minimized',
+ 'is_fullscreen' => 'is_fullscreen',
+ 'is_active' => 'is_active',
+ 'weight' => 'weight',
+ 'content' => 'content',
+ 'created_date' => 'created_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['dashboard_contact'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['dashboard_contact'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/Group.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2b227e236e53b17da87df4abee858cc9)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_Group extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Group ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Internal name of Group.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Name of Group.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Optional verbose description of the group.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Module or process which created this group.
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ * FK to saved search table.
+ *
+ * @var int unsigned
+ */
+ public $saved_search_id;
+ /**
+ * Is this entry active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * In what context(s) is this field visible.
+ *
+ * @var string
+ */
+ public $visibility;
+ /**
+ * the sql where clause if a saved search acl
+ *
+ * @var text
+ */
+ public $where_clause;
+ /**
+ * the tables to be included in a select data
+ *
+ * @var text
+ */
+ public $select_tables;
+ /**
+ * the tables to be included in the count statement
+ *
+ * @var text
+ */
+ public $where_tables;
+ /**
+ * FK to group type
+ *
+ * @var string
+ */
+ public $group_type;
+ /**
+ * Date when we created the cache for a smart group
+ *
+ * @var timestamp
+ */
+ public $cache_date;
+ /**
+ * Date and time when we need to refresh the cache next.
+ *
+ * @var timestamp
+ */
+ public $refresh_date;
+ /**
+ * IDs of the parent(s)
+ *
+ * @var text
+ */
+ public $parents;
+ /**
+ * IDs of the child(ren)
+ *
+ * @var text
+ */
+ public $children;
+ /**
+ * Is this group hidden?
+ *
+ * @var boolean
+ */
+ public $is_hidden;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * FK to contact table.
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * FK to contact table.
+ *
+ * @var int unsigned
+ */
+ public $modified_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_group';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'saved_search_id', 'civicrm_saved_search', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'modified_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group ID') ,
+ 'description' => 'Group ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Name') ,
+ 'description' => 'Internal name of Group.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Title') ,
+ 'description' => 'Name of Group.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Group Description') ,
+ 'description' => 'Optional verbose description of the group.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Source') ,
+ 'description' => 'Module or process which created this group.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'saved_search_id' => array(
+ 'name' => 'saved_search_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Saved Search ID') ,
+ 'description' => 'FK to saved search table.',
+ 'FKClassName' => 'CRM_Contact_DAO_SavedSearch',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Group Enabled') ,
+ 'description' => 'Is this entry active?',
+ ) ,
+ 'visibility' => array(
+ 'name' => 'visibility',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Visibility Setting') ,
+ 'description' => 'In what context(s) is this field visible.',
+ 'maxlength' => 24,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'default' => 'User and User Admin Only',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::groupVisibility',
+ )
+ ) ,
+ 'where_clause' => array(
+ 'name' => 'where_clause',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Group Where Clause') ,
+ 'description' => 'the sql where clause if a saved search acl',
+ ) ,
+ 'select_tables' => array(
+ 'name' => 'select_tables',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Tables For Select Clause') ,
+ 'description' => 'the tables to be included in a select data',
+ ) ,
+ 'where_tables' => array(
+ 'name' => 'where_tables',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Tables For Where Clause') ,
+ 'description' => 'the tables to be included in the count statement',
+ ) ,
+ 'group_type' => array(
+ 'name' => 'group_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Type') ,
+ 'description' => 'FK to group type',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'group_type',
+ 'optionEditPath' => 'civicrm/admin/options/group_type',
+ )
+ ) ,
+ 'cache_date' => array(
+ 'name' => 'cache_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Group Cache Date') ,
+ 'description' => 'Date when we created the cache for a smart group',
+ 'required' => false,
+ ) ,
+ 'refresh_date' => array(
+ 'name' => 'refresh_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Next Group Refresh Time') ,
+ 'description' => 'Date and time when we need to refresh the cache next.',
+ 'required' => false,
+ ) ,
+ 'parents' => array(
+ 'name' => 'parents',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Group Parents') ,
+ 'description' => 'IDs of the parent(s)',
+ ) ,
+ 'children' => array(
+ 'name' => 'children',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Group Children') ,
+ 'description' => 'IDs of the child(ren)',
+ ) ,
+ 'is_hidden' => array(
+ 'name' => 'is_hidden',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Group is Hidden') ,
+ 'description' => 'Is this group hidden?',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Group is Reserved') ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Created By') ,
+ 'description' => 'FK to contact table.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'modified_id' => array(
+ 'name' => 'modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Modified By') ,
+ 'description' => 'FK to contact table.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'source' => 'source',
+ 'saved_search_id' => 'saved_search_id',
+ 'is_active' => 'is_active',
+ 'visibility' => 'visibility',
+ 'where_clause' => 'where_clause',
+ 'select_tables' => 'select_tables',
+ 'where_tables' => 'where_tables',
+ 'group_type' => 'group_type',
+ 'cache_date' => 'cache_date',
+ 'refresh_date' => 'refresh_date',
+ 'parents' => 'parents',
+ 'children' => 'children',
+ 'is_hidden' => 'is_hidden',
+ 'is_reserved' => 'is_reserved',
+ 'created_id' => 'created_id',
+ 'modified_id' => 'modified_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/GroupContact.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3e2deec0ac027dd3b8f9a8410e7db54f)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_GroupContact extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_group_contact';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_group
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * FK to civicrm_contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * status of contact relative to membership in group
+ *
+ * @var string
+ */
+ public $status;
+ /**
+ * Optional location to associate with this membership
+ *
+ * @var int unsigned
+ */
+ public $location_id;
+ /**
+ * Optional email to associate with this membership
+ *
+ * @var int unsigned
+ */
+ public $email_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_group_contact
+ */
+ function __construct() {
+ $this->__table = 'civicrm_group_contact';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'location_id', 'civicrm_loc_block', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'email_id', 'civicrm_email', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Contact ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group ID') ,
+ 'description' => 'FK to civicrm_group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to civicrm_contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'status' => array(
+ 'name' => 'status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Contact Status') ,
+ 'description' => 'status of contact relative to membership in group',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::groupContactStatus',
+ )
+ ) ,
+ 'location_id' => array(
+ 'name' => 'location_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Contact Location') ,
+ 'description' => 'Optional location to associate with this membership',
+ 'FKClassName' => 'CRM_Core_DAO_LocBlock',
+ ) ,
+ 'email_id' => array(
+ 'name' => 'email_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Contact Email') ,
+ 'description' => 'Optional email to associate with this membership',
+ 'FKClassName' => 'CRM_Core_DAO_Email',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'group_id' => 'group_id',
+ 'contact_id' => 'contact_id',
+ 'status' => 'status',
+ 'location_id' => 'location_id',
+ 'email_id' => 'email_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['group_contact'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['group_contact'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/GroupContactCache.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:80d09930643ba2a11813af6e2f4fe693)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_GroupContactCache extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_group_contact_cache';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_group
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * FK to civicrm_contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_group_contact_cache
+ */
+ function __construct() {
+ $this->__table = 'civicrm_group_contact_cache';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Contact Cache ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group') ,
+ 'description' => 'FK to civicrm_group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to civicrm_contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'group_id' => 'group_id',
+ 'contact_id' => 'contact_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['group_contact_cache'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['group_contact_cache'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/GroupNesting.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b92da9c8d22f9e730b16168cfc33cef3)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_GroupNesting extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_group_nesting';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Relationship ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * ID of the child group
+ *
+ * @var int unsigned
+ */
+ public $child_group_id;
+ /**
+ * ID of the parent group
+ *
+ * @var int unsigned
+ */
+ public $parent_group_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_group_nesting
+ */
+ function __construct() {
+ $this->__table = 'civicrm_group_nesting';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'child_group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_group_id', 'civicrm_group', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Nesting ID') ,
+ 'description' => 'Relationship ID',
+ 'required' => true,
+ ) ,
+ 'child_group_id' => array(
+ 'name' => 'child_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Child Group') ,
+ 'description' => 'ID of the child group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ ) ,
+ 'parent_group_id' => array(
+ 'name' => 'parent_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent Group') ,
+ 'description' => 'ID of the parent group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'child_group_id' => 'child_group_id',
+ 'parent_group_id' => 'parent_group_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['group_nesting'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['group_nesting'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/GroupOrganization.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:212e1fb96ce775a5ef8e08e007cdcc66)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_GroupOrganization extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_group_organization';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Relationship ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * ID of the group
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * ID of the Organization Contact
+ *
+ * @var int unsigned
+ */
+ public $organization_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_group_organization
+ */
+ function __construct() {
+ $this->__table = 'civicrm_group_organization';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'organization_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Organization ID') ,
+ 'description' => 'Relationship ID',
+ 'required' => true,
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group') ,
+ 'description' => 'ID of the group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'organization_id' => array(
+ 'name' => 'organization_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Organization') ,
+ 'description' => 'ID of the Organization Contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'group_id' => 'group_id',
+ 'organization_id' => 'organization_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['group_organization'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['group_organization'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/Relationship.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:bd7d5f554d48b7d3333196024c3b8fb1)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_Relationship extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_relationship';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Relationship ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * id of the first contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id_a;
+ /**
+ * id of the second contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id_b;
+ /**
+ * id of the relationship
+ *
+ * @var int unsigned
+ */
+ public $relationship_type_id;
+ /**
+ * date when the relationship started
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * date when the relationship ended
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ * is the relationship active ?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Optional verbose description for the relationship.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * is contact a has permission to view / edit contact and
+ related data for contact b ?
+ *
+ * @var boolean
+ */
+ public $is_permission_a_b;
+ /**
+ * is contact b has permission to view / edit contact and
+ related data for contact a ?
+ *
+ * @var boolean
+ */
+ public $is_permission_b_a;
+ /**
+ * FK to civicrm_case
+ *
+ * @var int unsigned
+ */
+ public $case_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_relationship
+ */
+ function __construct() {
+ $this->__table = 'civicrm_relationship';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id_a', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id_b', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'relationship_type_id', 'civicrm_relationship_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'case_id', 'civicrm_case', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship ID') ,
+ 'description' => 'Relationship ID',
+ 'required' => true,
+ ) ,
+ 'contact_id_a' => array(
+ 'name' => 'contact_id_a',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact A') ,
+ 'description' => 'id of the first contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'contact_id_b' => array(
+ 'name' => 'contact_id_b',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact B') ,
+ 'description' => 'id of the second contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'relationship_type_id' => array(
+ 'name' => 'relationship_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship Type') ,
+ 'description' => 'id of the relationship',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_RelationshipType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Relationship Start Date') ,
+ 'description' => 'date when the relationship started',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Relationship End Date') ,
+ 'description' => 'date when the relationship ended',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Relationship Is Active') ,
+ 'description' => 'is the relationship active ?',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Description') ,
+ 'description' => 'Optional verbose description for the relationship.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_permission_a_b' => array(
+ 'name' => 'is_permission_a_b',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Contact A has Permission Over Contact B') ,
+ 'description' => 'is contact a has permission to view / edit contact and
+ related data for contact b ?
+ ',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_permission_b_a' => array(
+ 'name' => 'is_permission_b_a',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Contact B has Permission Over Contact A') ,
+ 'description' => 'is contact b has permission to view / edit contact and
+ related data for contact a ?
+ ',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'case_id' => array(
+ 'name' => 'case_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship Case') ,
+ 'description' => 'FK to civicrm_case',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Case_DAO_Case',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id_a' => 'contact_id_a',
+ 'contact_id_b' => 'contact_id_b',
+ 'relationship_type_id' => 'relationship_type_id',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ 'is_active' => 'is_active',
+ 'description' => 'description',
+ 'is_permission_a_b' => 'is_permission_a_b',
+ 'is_permission_b_a' => 'is_permission_b_a',
+ 'case_id' => 'case_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['relationship'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['relationship'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/RelationshipType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2be2e4092ddca15591c07772d701144b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_RelationshipType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_relationship_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * name for relationship of contact_a to contact_b.
+ *
+ * @var string
+ */
+ public $name_a_b;
+ /**
+ * label for relationship of contact_a to contact_b.
+ *
+ * @var string
+ */
+ public $label_a_b;
+ /**
+ * Optional name for relationship of contact_b to contact_a.
+ *
+ * @var string
+ */
+ public $name_b_a;
+ /**
+ * Optional label for relationship of contact_b to contact_a.
+ *
+ * @var string
+ */
+ public $label_b_a;
+ /**
+ * Optional verbose description of the relationship type.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * If defined, contact_a in a relationship of this type must be a specific contact_type.
+ *
+ * @var string
+ */
+ public $contact_type_a;
+ /**
+ * If defined, contact_b in a relationship of this type must be a specific contact_type.
+ *
+ * @var string
+ */
+ public $contact_type_b;
+ /**
+ * If defined, contact_sub_type_a in a relationship of this type must be a specific contact_sub_type.
+ *
+ * @var string
+ */
+ public $contact_sub_type_a;
+ /**
+ * If defined, contact_sub_type_b in a relationship of this type must be a specific contact_sub_type.
+ *
+ * @var string
+ */
+ public $contact_sub_type_b;
+ /**
+ * Is this relationship type a predefined system type (can not be changed or de-activated)?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this relationship type currently active (i.e. can be used when creating or editing relationships)?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_relationship_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_relationship_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship Type ID') ,
+ 'description' => 'Primary key',
+ 'required' => true,
+ ) ,
+ 'name_a_b' => array(
+ 'name' => 'name_a_b',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Type Name A to B') ,
+ 'description' => 'name for relationship of contact_a to contact_b.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'label_a_b' => array(
+ 'name' => 'label_a_b',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Type Label A to B') ,
+ 'description' => 'label for relationship of contact_a to contact_b.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'name_b_a' => array(
+ 'name' => 'name_b_a',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Type Name B to A') ,
+ 'description' => 'Optional name for relationship of contact_b to contact_a.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'label_b_a' => array(
+ 'name' => 'label_b_a',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Type Label B to A') ,
+ 'description' => 'Optional label for relationship of contact_b to contact_a.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Description') ,
+ 'description' => 'Optional verbose description of the relationship type.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'contact_type_a' => array(
+ 'name' => 'contact_type_a',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type for Contact A') ,
+ 'description' => 'If defined, contact_a in a relationship of this type must be a specific contact_type.',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NULL',
+ )
+ ) ,
+ 'contact_type_b' => array(
+ 'name' => 'contact_type_b',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type for Contact B') ,
+ 'description' => 'If defined, contact_b in a relationship of this type must be a specific contact_type.',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NULL',
+ )
+ ) ,
+ 'contact_sub_type_a' => array(
+ 'name' => 'contact_sub_type_a',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Subtype A') ,
+ 'description' => 'If defined, contact_sub_type_a in a relationship of this type must be a specific contact_sub_type.
+ ',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NOT NULL',
+ )
+ ) ,
+ 'contact_sub_type_b' => array(
+ 'name' => 'contact_sub_type_b',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Subtype B') ,
+ 'description' => 'If defined, contact_sub_type_b in a relationship of this type must be a specific contact_sub_type.
+ ',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NOT NULL',
+ )
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Relationship Type is Reserved') ,
+ 'description' => 'Is this relationship type a predefined system type (can not be changed or de-activated)?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Relationship Type is Active') ,
+ 'description' => 'Is this relationship type currently active (i.e. can be used when creating or editing relationships)?
+ ',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name_a_b' => 'name_a_b',
+ 'label_a_b' => 'label_a_b',
+ 'name_b_a' => 'name_b_a',
+ 'label_b_a' => 'label_b_a',
+ 'description' => 'description',
+ 'contact_type_a' => 'contact_type_a',
+ 'contact_type_b' => 'contact_type_b',
+ 'contact_sub_type_a' => 'contact_sub_type_a',
+ 'contact_sub_type_b' => 'contact_sub_type_b',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['relationship_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['relationship_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/SavedSearch.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:68a083df6062c6be6fbda72da478e15c)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_SavedSearch extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_saved_search';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Saved Search ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Submitted form values for this search
+ *
+ * @var text
+ */
+ public $form_values;
+ /**
+ * Foreign key to civicrm_mapping used for saved search-builder searches.
+ *
+ * @var int unsigned
+ */
+ public $mapping_id;
+ /**
+ * Foreign key to civicrm_option value table used for saved custom searches.
+ *
+ * @var int unsigned
+ */
+ public $search_custom_id;
+ /**
+ * the sql where clause if a saved search acl
+ *
+ * @var text
+ */
+ public $where_clause;
+ /**
+ * the tables to be included in a select data
+ *
+ * @var text
+ */
+ public $select_tables;
+ /**
+ * the tables to be included in the count statement
+ *
+ * @var text
+ */
+ public $where_tables;
+ /**
+ * class constructor
+ *
+ * @return civicrm_saved_search
+ */
+ function __construct() {
+ $this->__table = 'civicrm_saved_search';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mapping_id', 'civicrm_mapping', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Saved Search ID') ,
+ 'description' => 'Saved Search ID',
+ 'required' => true,
+ ) ,
+ 'form_values' => array(
+ 'name' => 'form_values',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Submitted Form Values') ,
+ 'description' => 'Submitted form values for this search',
+ 'import' => true,
+ 'where' => 'civicrm_saved_search.form_values',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'mapping_id' => array(
+ 'name' => 'mapping_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mapping ID') ,
+ 'description' => 'Foreign key to civicrm_mapping used for saved search-builder searches.',
+ 'FKClassName' => 'CRM_Core_DAO_Mapping',
+ ) ,
+ 'search_custom_id' => array(
+ 'name' => 'search_custom_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Value ID') ,
+ 'description' => 'Foreign key to civicrm_option value table used for saved custom searches.',
+ ) ,
+ 'where_clause' => array(
+ 'name' => 'where_clause',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Where Clause') ,
+ 'description' => 'the sql where clause if a saved search acl',
+ ) ,
+ 'select_tables' => array(
+ 'name' => 'select_tables',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Select Tables') ,
+ 'description' => 'the tables to be included in a select data',
+ ) ,
+ 'where_tables' => array(
+ 'name' => 'where_tables',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Where Tables') ,
+ 'description' => 'the tables to be included in the count statement',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'form_values' => 'form_values',
+ 'mapping_id' => 'mapping_id',
+ 'search_custom_id' => 'search_custom_id',
+ 'where_clause' => 'where_clause',
+ 'select_tables' => 'select_tables',
+ 'where_tables' => 'where_tables',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['saved_search'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['saved_search'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contact/SubscriptionHistory.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:8453fdd7e95e6187b20a06f5dc61cdde)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contact_DAO_SubscriptionHistory extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_subscription_history';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Internal Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Contact Id
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Group Id
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * Date of the (un)subscription
+ *
+ * @var datetime
+ */
+ public $date;
+ /**
+ * How the (un)subscription was triggered
+ *
+ * @var string
+ */
+ public $method;
+ /**
+ * The state of the contact within the group
+ *
+ * @var string
+ */
+ public $status;
+ /**
+ * IP address or other tracking info
+ *
+ * @var string
+ */
+ public $tracking;
+ /**
+ * class constructor
+ *
+ * @return civicrm_subscription_history
+ */
+ function __construct() {
+ $this->__table = 'civicrm_subscription_history';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Membership History ID') ,
+ 'description' => 'Internal Id',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Contact Id',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group') ,
+ 'description' => 'Group Id',
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'date' => array(
+ 'name' => 'date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Group Membership Action Date') ,
+ 'description' => 'Date of the (un)subscription',
+ 'required' => true,
+ ) ,
+ 'method' => array(
+ 'name' => 'method',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Membership Action') ,
+ 'description' => 'How the (un)subscription was triggered',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getSubscriptionHistoryMethods',
+ )
+ ) ,
+ 'status' => array(
+ 'name' => 'status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Membership Status') ,
+ 'description' => 'The state of the contact within the group',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::groupContactStatus',
+ )
+ ) ,
+ 'tracking' => array(
+ 'name' => 'tracking',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Membership Tracking') ,
+ 'description' => 'IP address or other tracking info',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'group_id' => 'group_id',
+ 'date' => 'date',
+ 'method' => 'method',
+ 'status' => 'status',
+ 'tracking' => 'tracking',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['subscription_history'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['subscription_history'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/Contribution.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:21419336661c08dc9c98f102a334dc40)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_Contribution extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Contribution ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to Financial Type for (total_amount - non_deductible_amount).
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * The Contribution Page which triggered this contribution
+ *
+ * @var int unsigned
+ */
+ public $contribution_page_id;
+ /**
+ * FK to Payment Instrument
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ * Date contribution was received - not necessarily the creation date of the record
+ *
+ * @var datetime
+ */
+ public $receive_date;
+ /**
+ * Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.
+ *
+ * @var float
+ */
+ public $non_deductible_amount;
+ /**
+ * Total amount of this contribution. Use market value for non-monetary gifts.
+ *
+ * @var float
+ */
+ public $total_amount;
+ /**
+ * actual processor fee if known - may be 0.
+ *
+ * @var float
+ */
+ public $fee_amount;
+ /**
+ * actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
+ *
+ * @var float
+ */
+ public $net_amount;
+ /**
+ * unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
+ *
+ * @var string
+ */
+ public $trxn_id;
+ /**
+ * unique invoice id, system generated or passed in
+ *
+ * @var string
+ */
+ public $invoice_id;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * when was gift cancelled
+ *
+ * @var datetime
+ */
+ public $cancel_date;
+ /**
+ *
+ * @var text
+ */
+ public $cancel_reason;
+ /**
+ * when (if) receipt was sent. populated automatically for online donations w/ automatic receipting
+ *
+ * @var datetime
+ */
+ public $receipt_date;
+ /**
+ * when (if) was donor thanked
+ *
+ * @var datetime
+ */
+ public $thankyou_date;
+ /**
+ * Origin of this Contribution.
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ *
+ * @var text
+ */
+ public $amount_level;
+ /**
+ * Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
+ *
+ * @var int unsigned
+ */
+ public $contribution_recur_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_pay_later;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $contribution_status_id;
+ /**
+ * Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.
+ *
+ * @var int unsigned
+ */
+ public $address_id;
+ /**
+ *
+ * @var string
+ */
+ public $check_number;
+ /**
+ * The campaign for which this contribution has been triggered.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * unique credit note id, system generated or passed in
+ *
+ * @var string
+ */
+ public $creditnote_id;
+ /**
+ * Total tax amount of this contribution.
+ *
+ * @var float
+ */
+ public $tax_amount;
+ /**
+ * Stores the date when revenue should be recognized.
+ *
+ * @var datetime
+ */
+ public $revenue_recognition_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_page_id', 'civicrm_contribution_page', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_recur_id', 'civicrm_contribution_recur', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'address_id', 'civicrm_address', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'contribution_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution ID') ,
+ 'description' => 'Contribution ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'contribution_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.contact_id',
+ 'headerPattern' => '/contact(.?id)?/i',
+ 'dataPattern' => '/^\d+$/',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type for (total_amount - non_deductible_amount).',
+ 'export' => false,
+ 'where' => 'civicrm_contribution.financial_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'contribution_page_id' => array(
+ 'name' => 'contribution_page_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page ID') ,
+ 'description' => 'The Contribution Page which triggered this contribution',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.contribution_page_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contribution_page',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Method') ,
+ 'description' => 'FK to Payment Instrument',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ 'receive_date' => array(
+ 'name' => 'receive_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Date Received') ,
+ 'description' => 'Date contribution was received - not necessarily the creation date of the record',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.receive_date',
+ 'headerPattern' => '/receive(.?date)?/i',
+ 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'non_deductible_amount' => array(
+ 'name' => 'non_deductible_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Non-deductible Amount') ,
+ 'description' => 'Portion of total amount which is NOT tax deductible. Equal to total_amount for non-deductible financial types.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.non_deductible_amount',
+ 'headerPattern' => '/non?.?deduct/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'total_amount' => array(
+ 'name' => 'total_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Total Amount') ,
+ 'description' => 'Total amount of this contribution. Use market value for non-monetary gifts.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.total_amount',
+ 'headerPattern' => '/^total|(.?^am(ou)?nt)/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'fee_amount' => array(
+ 'name' => 'fee_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Fee Amount') ,
+ 'description' => 'actual processor fee if known - may be 0.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.fee_amount',
+ 'headerPattern' => '/fee(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'net_amount' => array(
+ 'name' => 'net_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Net Amount') ,
+ 'description' => 'actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.net_amount',
+ 'headerPattern' => '/net(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'trxn_id' => array(
+ 'name' => 'trxn_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Transaction ID') ,
+ 'description' => 'unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.trxn_id',
+ 'headerPattern' => '/tr(ansactio|x)n(.?id)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'invoice_id' => array(
+ 'name' => 'invoice_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Invoice ID') ,
+ 'description' => 'unique invoice id, system generated or passed in',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.invoice_id',
+ 'headerPattern' => '/invoice(.?id)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.currency',
+ 'headerPattern' => '/cur(rency)?/i',
+ 'dataPattern' => '/^[A-Z]{3}$/i',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'cancel_date' => array(
+ 'name' => 'cancel_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Cancel Date') ,
+ 'description' => 'when was gift cancelled',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.cancel_date',
+ 'headerPattern' => '/cancel(.?date)?/i',
+ 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'cancel_reason' => array(
+ 'name' => 'cancel_reason',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Cancel Reason') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.cancel_reason',
+ 'headerPattern' => '/(cancel.?)?reason/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'receipt_date' => array(
+ 'name' => 'receipt_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Receipt Date') ,
+ 'description' => 'when (if) receipt was sent. populated automatically for online donations w/ automatic receipting',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.receipt_date',
+ 'headerPattern' => '/receipt(.?date)?/i',
+ 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'thankyou_date' => array(
+ 'name' => 'thankyou_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Thank-you Date') ,
+ 'description' => 'when (if) was donor thanked',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.thankyou_date',
+ 'headerPattern' => '/thank(s|(.?you))?(.?date)?/i',
+ 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'contribution_source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contribution Source') ,
+ 'description' => 'Origin of this Contribution.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.source',
+ 'headerPattern' => '/source/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'amount_level' => array(
+ 'name' => 'amount_level',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Amount Label') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.amount_level',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'contribution_recur_id' => array(
+ 'name' => 'contribution_recur_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Recurring Contribution ID') ,
+ 'description' => 'Conditional foreign key to civicrm_contribution_recur id. Each contribution made in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.',
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
+ ) ,
+ 'is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.is_test',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_pay_later' => array(
+ 'name' => 'is_pay_later',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Pay Later') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.is_pay_later',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'contribution_status_id' => array(
+ 'name' => 'contribution_status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Status ID') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.contribution_status_id',
+ 'headerPattern' => '/status/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'contribution_status',
+ 'optionEditPath' => 'civicrm/admin/options/contribution_status',
+ )
+ ) ,
+ 'address_id' => array(
+ 'name' => 'address_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Address') ,
+ 'description' => 'Conditional foreign key to civicrm_address.id. We insert an address record for each contribution when we have associated billing name and address data.',
+ 'FKClassName' => 'CRM_Core_DAO_Address',
+ ) ,
+ 'check_number' => array(
+ 'name' => 'check_number',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Check Number') ,
+ 'maxlength' => 255,
+ 'size' => 6,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.check_number',
+ 'headerPattern' => '/check(.?number)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'contribution_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this contribution has been triggered.',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'creditnote_id' => array(
+ 'name' => 'creditnote_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Credit Note ID') ,
+ 'description' => 'unique credit note id, system generated or passed in',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.creditnote_id',
+ 'headerPattern' => '/creditnote(.?id)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'tax_amount' => array(
+ 'name' => 'tax_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Tax Amount') ,
+ 'description' => 'Total tax amount of this contribution.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution.tax_amount',
+ 'headerPattern' => '/tax(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'revenue_recognition_date' => array(
+ 'name' => 'revenue_recognition_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Revenue Recognition Date') ,
+ 'description' => 'Stores the date when revenue should be recognized.',
+ 'import' => true,
+ 'where' => 'civicrm_contribution.revenue_recognition_date',
+ 'headerPattern' => '/revenue(.?date)?/i',
+ 'dataPattern' => '/^\d{4}-?\d{2}-?\d{2} ?(\d{2}:?\d{2}:?(\d{2})?)?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'contribution_id',
+ 'contact_id' => 'contribution_contact_id',
+ 'financial_type_id' => 'financial_type_id',
+ 'contribution_page_id' => 'contribution_page_id',
+ 'payment_instrument_id' => 'payment_instrument_id',
+ 'receive_date' => 'receive_date',
+ 'non_deductible_amount' => 'non_deductible_amount',
+ 'total_amount' => 'total_amount',
+ 'fee_amount' => 'fee_amount',
+ 'net_amount' => 'net_amount',
+ 'trxn_id' => 'trxn_id',
+ 'invoice_id' => 'invoice_id',
+ 'currency' => 'currency',
+ 'cancel_date' => 'cancel_date',
+ 'cancel_reason' => 'cancel_reason',
+ 'receipt_date' => 'receipt_date',
+ 'thankyou_date' => 'thankyou_date',
+ 'source' => 'contribution_source',
+ 'amount_level' => 'amount_level',
+ 'contribution_recur_id' => 'contribution_recur_id',
+ 'is_test' => 'is_test',
+ 'is_pay_later' => 'is_pay_later',
+ 'contribution_status_id' => 'contribution_status_id',
+ 'address_id' => 'address_id',
+ 'check_number' => 'check_number',
+ 'campaign_id' => 'contribution_campaign_id',
+ 'creditnote_id' => 'creditnote_id',
+ 'tax_amount' => 'tax_amount',
+ 'revenue_recognition_date' => 'revenue_recognition_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/ContributionPage.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:5ee386ebb241a924256941b964427a29)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_ContributionPage extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution_page';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Contribution Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Contribution Page title. For top of page display
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Text and html allowed. Displayed below title.
+ *
+ * @var text
+ */
+ public $intro_text;
+ /**
+ * default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Payment Processors configured for this contribution Page
+ *
+ * @var string
+ */
+ public $payment_processor;
+ /**
+ * if true - processing logic must reject transaction at confirmation stage if pay method != credit card
+ *
+ * @var boolean
+ */
+ public $is_credit_card_only;
+ /**
+ * if true - allows real-time monetary transactions otherwise non-monetary transactions
+ *
+ * @var boolean
+ */
+ public $is_monetary;
+ /**
+ * if true - allows recurring contributions, valid only for PayPal_Standard
+ *
+ * @var boolean
+ */
+ public $is_recur;
+ /**
+ * if false, the confirm page in contribution pages gets skipped
+ *
+ * @var boolean
+ */
+ public $is_confirm_enabled;
+ /**
+ * Supported recurring frequency units.
+ *
+ * @var string
+ */
+ public $recur_frequency_unit;
+ /**
+ * if true - supports recurring intervals
+ *
+ * @var boolean
+ */
+ public $is_recur_interval;
+ /**
+ * if true - asks user for recurring installments
+ *
+ * @var boolean
+ */
+ public $is_recur_installments;
+ /**
+ * if true - user is able to adjust payment start date
+ *
+ * @var boolean
+ */
+ public $adjust_recur_start_date;
+ /**
+ * if true - allows the user to send payment directly to the org later
+ *
+ * @var boolean
+ */
+ public $is_pay_later;
+ /**
+ * The text displayed to the user in the main form
+ *
+ * @var text
+ */
+ public $pay_later_text;
+ /**
+ * The receipt sent to the user instead of the normal receipt text
+ *
+ * @var text
+ */
+ public $pay_later_receipt;
+ /**
+ * is partial payment enabled for this online contribution page
+ *
+ * @var boolean
+ */
+ public $is_partial_payment;
+ /**
+ * Initial amount label for partial payment
+ *
+ * @var string
+ */
+ public $initial_amount_label;
+ /**
+ * Initial amount help text for partial payment
+ *
+ * @var text
+ */
+ public $initial_amount_help_text;
+ /**
+ * Minimum initial amount for partial payment
+ *
+ * @var float
+ */
+ public $min_initial_amount;
+ /**
+ * if true, page will include an input text field where user can enter their own amount
+ *
+ * @var boolean
+ */
+ public $is_allow_other_amount;
+ /**
+ * FK to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $default_amount_id;
+ /**
+ * if other amounts allowed, user can configure minimum allowed.
+ *
+ * @var float
+ */
+ public $min_amount;
+ /**
+ * if other amounts allowed, user can configure maximum allowed.
+ *
+ * @var float
+ */
+ public $max_amount;
+ /**
+ * The target goal for this page, allows people to build a goal meter
+ *
+ * @var float
+ */
+ public $goal_amount;
+ /**
+ * Title for Thank-you page (header title tag, and display at the top of the page).
+ *
+ * @var string
+ */
+ public $thankyou_title;
+ /**
+ * text and html allowed. displayed above result on success page
+ *
+ * @var text
+ */
+ public $thankyou_text;
+ /**
+ * Text and html allowed. displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc.
+ *
+ * @var text
+ */
+ public $thankyou_footer;
+ /**
+ * if true, receipt is automatically emailed to contact on success
+ *
+ * @var boolean
+ */
+ public $is_email_receipt;
+ /**
+ * FROM email name used for receipts generated by contributions to this contribution page.
+ *
+ * @var string
+ */
+ public $receipt_from_name;
+ /**
+ * FROM email address used for receipts generated by contributions to this contribution page.
+ *
+ * @var string
+ */
+ public $receipt_from_email;
+ /**
+ * comma-separated list of email addresses to cc each time a receipt is sent
+ *
+ * @var string
+ */
+ public $cc_receipt;
+ /**
+ * comma-separated list of email addresses to bcc each time a receipt is sent
+ *
+ * @var string
+ */
+ public $bcc_receipt;
+ /**
+ * text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now
+ *
+ * @var text
+ */
+ public $receipt_text;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.
+ *
+ * @var text
+ */
+ public $footer_text;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $amount_block_is_active;
+ /**
+ * Date and time that this page starts.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * Date and time that this page ends. May be NULL if no defined end date/time
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * FK to civicrm_contact, who created this contribution page
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time that contribution page was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * The campaign for which we are collecting contributions with this page.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Can people share the contribution page through social media?
+ *
+ * @var boolean
+ */
+ public $is_share;
+ /**
+ * if true - billing block is required for online contribution page
+ *
+ * @var boolean
+ */
+ public $is_billing_required;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution_page
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution_page';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page ID') ,
+ 'description' => 'Contribution Id',
+ 'required' => true,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contribution Page Title') ,
+ 'description' => 'Contribution Page title. For top of page display',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'intro_text' => array(
+ 'name' => 'intro_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Contribution Page Introduction Text') ,
+ 'description' => 'Text and html allowed. Displayed below title.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'default financial type assigned to contributions submitted via this page, e.g. Contribution, Campaign Contribution',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'payment_processor' => array(
+ 'name' => 'payment_processor',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Payment Processor') ,
+ 'description' => 'Payment Processors configured for this contribution Page',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_payment_processor',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'is_credit_card_only' => array(
+ 'name' => 'is_credit_card_only',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Credit Card Only?') ,
+ 'description' => 'if true - processing logic must reject transaction at confirmation stage if pay method != credit card',
+ ) ,
+ 'is_monetary' => array(
+ 'name' => 'is_monetary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Monetary') ,
+ 'description' => 'if true - allows real-time monetary transactions otherwise non-monetary transactions',
+ 'default' => '1',
+ ) ,
+ 'is_recur' => array(
+ 'name' => 'is_recur',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Recurring') ,
+ 'description' => 'if true - allows recurring contributions, valid only for PayPal_Standard',
+ ) ,
+ 'is_confirm_enabled' => array(
+ 'name' => 'is_confirm_enabled',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Confirmation Page?') ,
+ 'description' => 'if false, the confirm page in contribution pages gets skipped',
+ 'default' => '1',
+ ) ,
+ 'recur_frequency_unit' => array(
+ 'name' => 'recur_frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Recurring Frequency') ,
+ 'description' => 'Supported recurring frequency units.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_recur_interval' => array(
+ 'name' => 'is_recur_interval',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Support Recurring Intervals') ,
+ 'description' => 'if true - supports recurring intervals',
+ ) ,
+ 'is_recur_installments' => array(
+ 'name' => 'is_recur_installments',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Recurring Installments?') ,
+ 'description' => 'if true - asks user for recurring installments',
+ ) ,
+ 'adjust_recur_start_date' => array(
+ 'name' => 'adjust_recur_start_date',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Adjust Recurring Start Date') ,
+ 'description' => 'if true - user is able to adjust payment start date',
+ ) ,
+ 'is_pay_later' => array(
+ 'name' => 'is_pay_later',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Pay Later') ,
+ 'description' => 'if true - allows the user to send payment directly to the org later',
+ ) ,
+ 'pay_later_text' => array(
+ 'name' => 'pay_later_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Pay Later Text') ,
+ 'description' => 'The text displayed to the user in the main form',
+ ) ,
+ 'pay_later_receipt' => array(
+ 'name' => 'pay_later_receipt',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Pay Later Receipt') ,
+ 'description' => 'The receipt sent to the user instead of the normal receipt text',
+ ) ,
+ 'is_partial_payment' => array(
+ 'name' => 'is_partial_payment',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Partial Payment') ,
+ 'description' => 'is partial payment enabled for this online contribution page',
+ ) ,
+ 'initial_amount_label' => array(
+ 'name' => 'initial_amount_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Initial Amount Label') ,
+ 'description' => 'Initial amount label for partial payment',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'initial_amount_help_text' => array(
+ 'name' => 'initial_amount_help_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Initial Amount Help Text') ,
+ 'description' => 'Initial amount help text for partial payment',
+ ) ,
+ 'min_initial_amount' => array(
+ 'name' => 'min_initial_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Min Initial Amount') ,
+ 'description' => 'Minimum initial amount for partial payment',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'is_allow_other_amount' => array(
+ 'name' => 'is_allow_other_amount',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Other Amounts') ,
+ 'description' => 'if true, page will include an input text field where user can enter their own amount',
+ ) ,
+ 'default_amount_id' => array(
+ 'name' => 'default_amount_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Default Amount') ,
+ 'description' => 'FK to civicrm_option_value.',
+ ) ,
+ 'min_amount' => array(
+ 'name' => 'min_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Minimum Amount') ,
+ 'description' => 'if other amounts allowed, user can configure minimum allowed.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'max_amount' => array(
+ 'name' => 'max_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Maximum Amount') ,
+ 'description' => 'if other amounts allowed, user can configure maximum allowed.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'goal_amount' => array(
+ 'name' => 'goal_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Goal Amount') ,
+ 'description' => 'The target goal for this page, allows people to build a goal meter',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'thankyou_title' => array(
+ 'name' => 'thankyou_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Thank-you Title') ,
+ 'description' => 'Title for Thank-you page (header title tag, and display at the top of the page).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'thankyou_text' => array(
+ 'name' => 'thankyou_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Thank-you Text') ,
+ 'description' => 'text and html allowed. displayed above result on success page',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'thankyou_footer' => array(
+ 'name' => 'thankyou_footer',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Thank-you Footer') ,
+ 'description' => 'Text and html allowed. displayed at the bottom of the success page. Common usage is to include link(s) to other pages such as tell-a-friend, etc.',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'is_email_receipt' => array(
+ 'name' => 'is_email_receipt',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Send email Receipt') ,
+ 'description' => 'if true, receipt is automatically emailed to contact on success',
+ ) ,
+ 'receipt_from_name' => array(
+ 'name' => 'receipt_from_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Receipt From') ,
+ 'description' => 'FROM email name used for receipts generated by contributions to this contribution page.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'receipt_from_email' => array(
+ 'name' => 'receipt_from_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Receipt From email') ,
+ 'description' => 'FROM email address used for receipts generated by contributions to this contribution page.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'cc_receipt' => array(
+ 'name' => 'cc_receipt',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Receipt cc') ,
+ 'description' => 'comma-separated list of email addresses to cc each time a receipt is sent',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'bcc_receipt' => array(
+ 'name' => 'bcc_receipt',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Receipt bcc') ,
+ 'description' => 'comma-separated list of email addresses to bcc each time a receipt is sent',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'receipt_text' => array(
+ 'name' => 'receipt_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Receipt Text') ,
+ 'description' => 'text to include above standard receipt info on receipt email. emails are text-only, so do not allow html for now',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Page Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'footer_text' => array(
+ 'name' => 'footer_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Footer Text') ,
+ 'description' => 'Text and html allowed. Displayed at the bottom of the first page of the contribution wizard.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'amount_block_is_active' => array(
+ 'name' => 'amount_block_is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Amount Block Active?') ,
+ 'description' => 'Is this property active?',
+ 'default' => '1',
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Contribution Page Start Date') ,
+ 'description' => 'Date and time that this page starts.',
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Contribution Page End Date') ,
+ 'description' => 'Date and time that this page ends. May be NULL if no defined end date/time',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this contribution page',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Contribution Page Created Date') ,
+ 'description' => 'Date and time that contribution page was created.',
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contribution Page Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page Campaign ID') ,
+ 'description' => 'The campaign for which we are collecting contributions with this page.',
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'is_share' => array(
+ 'name' => 'is_share',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Contribution Page Shared?') ,
+ 'description' => 'Can people share the contribution page through social media?',
+ 'default' => '1',
+ ) ,
+ 'is_billing_required' => array(
+ 'name' => 'is_billing_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is billing block required') ,
+ 'description' => 'if true - billing block is required for online contribution page',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'title' => 'title',
+ 'intro_text' => 'intro_text',
+ 'financial_type_id' => 'financial_type_id',
+ 'payment_processor' => 'payment_processor',
+ 'is_credit_card_only' => 'is_credit_card_only',
+ 'is_monetary' => 'is_monetary',
+ 'is_recur' => 'is_recur',
+ 'is_confirm_enabled' => 'is_confirm_enabled',
+ 'recur_frequency_unit' => 'recur_frequency_unit',
+ 'is_recur_interval' => 'is_recur_interval',
+ 'is_recur_installments' => 'is_recur_installments',
+ 'adjust_recur_start_date' => 'adjust_recur_start_date',
+ 'is_pay_later' => 'is_pay_later',
+ 'pay_later_text' => 'pay_later_text',
+ 'pay_later_receipt' => 'pay_later_receipt',
+ 'is_partial_payment' => 'is_partial_payment',
+ 'initial_amount_label' => 'initial_amount_label',
+ 'initial_amount_help_text' => 'initial_amount_help_text',
+ 'min_initial_amount' => 'min_initial_amount',
+ 'is_allow_other_amount' => 'is_allow_other_amount',
+ 'default_amount_id' => 'default_amount_id',
+ 'min_amount' => 'min_amount',
+ 'max_amount' => 'max_amount',
+ 'goal_amount' => 'goal_amount',
+ 'thankyou_title' => 'thankyou_title',
+ 'thankyou_text' => 'thankyou_text',
+ 'thankyou_footer' => 'thankyou_footer',
+ 'is_email_receipt' => 'is_email_receipt',
+ 'receipt_from_name' => 'receipt_from_name',
+ 'receipt_from_email' => 'receipt_from_email',
+ 'cc_receipt' => 'cc_receipt',
+ 'bcc_receipt' => 'bcc_receipt',
+ 'receipt_text' => 'receipt_text',
+ 'is_active' => 'is_active',
+ 'footer_text' => 'footer_text',
+ 'amount_block_is_active' => 'amount_block_is_active',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'currency' => 'currency',
+ 'campaign_id' => 'campaign_id',
+ 'is_share' => 'is_share',
+ 'is_billing_required' => 'is_billing_required',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution_page'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution_page'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/ContributionProduct.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3dc11bb8d780aa095b214dbcf0c8f1e6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_ContributionProduct extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution_product';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $product_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * Option value selected if applicable - e.g. color, size etc.
+ *
+ * @var string
+ */
+ public $product_option;
+ /**
+ *
+ * @var int
+ */
+ public $quantity;
+ /**
+ * Optional. Can be used to record the date this product was fulfilled or shipped.
+ *
+ * @var date
+ */
+ public $fulfilled_date;
+ /**
+ * Actual start date for a time-delimited premium (subscription, service or membership)
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * Actual end date for a time-delimited premium (subscription, service or membership)
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ *
+ * @var text
+ */
+ public $comment;
+ /**
+ * FK to Financial Type(for membership price sets only).
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution_product
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution_product';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Product ID') ,
+ 'required' => true,
+ ) ,
+ 'product_id' => array(
+ 'name' => 'product_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Product ID') ,
+ 'required' => true,
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution ID') ,
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ 'product_option' => array(
+ 'name' => 'product_option',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Product Option') ,
+ 'description' => 'Option value selected if applicable - e.g. color, size etc.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'export' => true,
+ 'where' => 'civicrm_contribution_product.product_option',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'quantity' => array(
+ 'name' => 'quantity',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Quantity') ,
+ 'export' => true,
+ 'where' => 'civicrm_contribution_product.quantity',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'fulfilled_date' => array(
+ 'name' => 'fulfilled_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Fulfilled Date') ,
+ 'description' => 'Optional. Can be used to record the date this product was fulfilled or shipped.',
+ 'export' => true,
+ 'where' => 'civicrm_contribution_product.fulfilled_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'contribution_start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Start date for premium') ,
+ 'description' => 'Actual start date for a time-delimited premium (subscription, service or membership)',
+ 'export' => true,
+ 'where' => 'civicrm_contribution_product.start_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'contribution_end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('End date for premium') ,
+ 'description' => 'Actual end date for a time-delimited premium (subscription, service or membership)',
+ 'export' => true,
+ 'where' => 'civicrm_contribution_product.end_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'comment' => array(
+ 'name' => 'comment',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Premium comment') ,
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type(for membership price sets only).',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'product_id' => 'product_id',
+ 'contribution_id' => 'contribution_id',
+ 'product_option' => 'product_option',
+ 'quantity' => 'quantity',
+ 'fulfilled_date' => 'fulfilled_date',
+ 'start_date' => 'contribution_start_date',
+ 'end_date' => 'contribution_end_date',
+ 'comment' => 'comment',
+ 'financial_type_id' => 'financial_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution_product'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution_product'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/ContributionRecur.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:fe7fe63ae2bf5e2e2c1f9e2449d5bda6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_ContributionRecur extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution_recur';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Contribution Recur ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign key to civicrm_contact.id .
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Amount to be contributed or charged each recurrence.
+ *
+ * @var float
+ */
+ public $amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * Time units for recurrence of payment.
+ *
+ * @var string
+ */
+ public $frequency_unit;
+ /**
+ * Number of time units for recurrence of payment.
+ *
+ * @var int unsigned
+ */
+ public $frequency_interval;
+ /**
+ * Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.
+ *
+ * @var int unsigned
+ */
+ public $installments;
+ /**
+ * The date the first scheduled recurring contribution occurs.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * When this recurring contribution record was created.
+ *
+ * @var datetime
+ */
+ public $create_date;
+ /**
+ * Last updated date for this record. mostly the last time a payment was received
+ *
+ * @var datetime
+ */
+ public $modified_date;
+ /**
+ * Date this recurring contribution was cancelled by contributor- if we can get access to it
+ *
+ * @var datetime
+ */
+ public $cancel_date;
+ /**
+ * Date this recurring contribution finished successfully
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??
+ *
+ * @var string
+ */
+ public $processor_id;
+ /**
+ * Optionally used to store a link to a payment token used for this recurring contribution.
+ *
+ * @var int unsigned
+ */
+ public $payment_token_id;
+ /**
+ * unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method
+ *
+ * @var string
+ */
+ public $trxn_id;
+ /**
+ * unique invoice id, system generated or passed in
+ *
+ * @var string
+ */
+ public $invoice_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $contribution_status_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ * Day in the period when the payment should be charged e.g. 1st of month, 15th etc.
+ *
+ * @var int unsigned
+ */
+ public $cycle_day;
+ /**
+ * Next scheduled date
+ *
+ * @var datetime
+ */
+ public $next_sched_contribution_date;
+ /**
+ * Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.
+ *
+ * @var int unsigned
+ */
+ public $failure_count;
+ /**
+ * Date to retry failed attempt
+ *
+ * @var datetime
+ */
+ public $failure_retry_date;
+ /**
+ * Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.
+ *
+ * @var boolean
+ */
+ public $auto_renew;
+ /**
+ * Foreign key to civicrm_payment_processor.id
+ *
+ * @var int unsigned
+ */
+ public $payment_processor_id;
+ /**
+ * FK to Financial Type
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * FK to Payment Instrument
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ * The campaign for which this contribution has been triggered.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * if true, receipt is automatically emailed to contact on each successful payment
+ *
+ * @var boolean
+ */
+ public $is_email_receipt;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution_recur
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution_recur';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_token_id', 'civicrm_payment_token', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_id', 'civicrm_payment_processor', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Recurring Contribution ID') ,
+ 'description' => 'Contribution Recur ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Foreign key to civicrm_contact.id .',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Amount') ,
+ 'description' => 'Amount to be contributed or charged each recurrence.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'frequency_unit' => array(
+ 'name' => 'frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Frequency Unit') ,
+ 'description' => 'Time units for recurrence of payment.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'month',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'recur_frequency_units',
+ 'keyColumn' => 'name',
+ 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
+ )
+ ) ,
+ 'frequency_interval' => array(
+ 'name' => 'frequency_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Interval (number of units)') ,
+ 'description' => 'Number of time units for recurrence of payment.',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'installments' => array(
+ 'name' => 'installments',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Number of Installments') ,
+ 'description' => 'Total number of payments to be made. Set this to 0 if this is an open-ended commitment i.e. no set end date.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Recurring Contribution Started Date') ,
+ 'description' => 'The date the first scheduled recurring contribution occurs.',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'create_date' => array(
+ 'name' => 'create_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Recurring Contribution Created Date') ,
+ 'description' => 'When this recurring contribution record was created.',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Recurring Contribution Modified Date') ,
+ 'description' => 'Last updated date for this record. mostly the last time a payment was received',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'cancel_date' => array(
+ 'name' => 'cancel_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Recurring Contribution Cancel Date') ,
+ 'description' => 'Date this recurring contribution was cancelled by contributor- if we can get access to it',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Recurring Contribution End Date') ,
+ 'description' => 'Date this recurring contribution finished successfully',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'processor_id' => array(
+ 'name' => 'processor_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Processor ID') ,
+ 'description' => 'Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'payment_token_id' => array(
+ 'name' => 'payment_token_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Token ID') ,
+ 'description' => 'Optionally used to store a link to a payment token used for this recurring contribution.',
+ 'FKClassName' => 'CRM_Financial_DAO_PaymentToken',
+ ) ,
+ 'trxn_id' => array(
+ 'name' => 'trxn_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Transaction ID') ,
+ 'description' => 'unique transaction id. may be processor id, bank id + trans id, or account number + check number... depending on payment_method',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'invoice_id' => array(
+ 'name' => 'invoice_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Invoice ID') ,
+ 'description' => 'unique invoice id, system generated or passed in',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'contribution_status_id' => array(
+ 'name' => 'contribution_status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Recurring Contribution Status') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution_recur.contribution_status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'contribution_status',
+ 'optionEditPath' => 'civicrm/admin/options/contribution_status',
+ )
+ ) ,
+ 'is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution_recur.is_test',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'cycle_day' => array(
+ 'name' => 'cycle_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Number of Cycle Day') ,
+ 'description' => 'Day in the period when the payment should be charged e.g. 1st of month, 15th etc.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'next_sched_contribution_date' => array(
+ 'name' => 'next_sched_contribution_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Next Scheduled Contribution Date') ,
+ 'description' => 'Next scheduled date',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'failure_count' => array(
+ 'name' => 'failure_count',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Number of Failures') ,
+ 'description' => 'Number of failed charge attempts since last success. Business rule could be set to deactivate on more than x failures.',
+ ) ,
+ 'failure_retry_date' => array(
+ 'name' => 'failure_retry_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Retry Failed Attempt Date') ,
+ 'description' => 'Date to retry failed attempt',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'auto_renew' => array(
+ 'name' => 'auto_renew',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Auto Renew') ,
+ 'description' => 'Some systems allow contributor to set a number of installments - but then auto-renew the subscription or commitment if they do not cancel.',
+ 'required' => true,
+ ) ,
+ 'payment_processor_id' => array(
+ 'name' => 'payment_processor_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor') ,
+ 'description' => 'Foreign key to civicrm_payment_processor.id',
+ 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor',
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type',
+ 'export' => false,
+ 'where' => 'civicrm_contribution_recur.financial_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Method') ,
+ 'description' => 'FK to Payment Instrument',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ 'contribution_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this contribution has been triggered.',
+ 'import' => true,
+ 'where' => 'civicrm_contribution_recur.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'is_email_receipt' => array(
+ 'name' => 'is_email_receipt',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Send email Receipt?') ,
+ 'description' => 'if true, receipt is automatically emailed to contact on each successful payment',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'amount' => 'amount',
+ 'currency' => 'currency',
+ 'frequency_unit' => 'frequency_unit',
+ 'frequency_interval' => 'frequency_interval',
+ 'installments' => 'installments',
+ 'start_date' => 'start_date',
+ 'create_date' => 'create_date',
+ 'modified_date' => 'modified_date',
+ 'cancel_date' => 'cancel_date',
+ 'end_date' => 'end_date',
+ 'processor_id' => 'processor_id',
+ 'payment_token_id' => 'payment_token_id',
+ 'trxn_id' => 'trxn_id',
+ 'invoice_id' => 'invoice_id',
+ 'contribution_status_id' => 'contribution_status_id',
+ 'is_test' => 'is_test',
+ 'cycle_day' => 'cycle_day',
+ 'next_sched_contribution_date' => 'next_sched_contribution_date',
+ 'failure_count' => 'failure_count',
+ 'failure_retry_date' => 'failure_retry_date',
+ 'auto_renew' => 'auto_renew',
+ 'payment_processor_id' => 'payment_processor_id',
+ 'financial_type_id' => 'financial_type_id',
+ 'payment_instrument_id' => 'payment_instrument_id',
+ 'campaign_id' => 'contribution_campaign_id',
+ 'is_email_receipt' => 'is_email_receipt',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution_recur'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution_recur'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/ContributionSoft.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3ba9cc08a7096d901735622557f85f3d)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_ContributionSoft extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution_soft';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Soft Contribution ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to contribution table.
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Amount of this soft contribution.
+ *
+ * @var float
+ */
+ public $amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * FK to civicrm_pcp.id
+ *
+ * @var int unsigned
+ */
+ public $pcp_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $pcp_display_in_roll;
+ /**
+ *
+ * @var string
+ */
+ public $pcp_roll_nickname;
+ /**
+ *
+ * @var string
+ */
+ public $pcp_personal_note;
+ /**
+ * Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.
+ *
+ * @var int unsigned
+ */
+ public $soft_credit_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution_soft
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution_soft';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'pcp_id', 'civicrm_pcp', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'contribution_soft_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Soft Contribution ID') ,
+ 'description' => 'Soft Contribution ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contribution_soft.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Soft Contribution - Contribution') ,
+ 'description' => 'FK to contribution table.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ 'contribution_soft_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_contribution_soft.contact_id',
+ 'headerPattern' => '/contact(.?id)?/i',
+ 'dataPattern' => '/^\d+$/',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Soft Contribution Amount') ,
+ 'description' => 'Amount of this soft contribution.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_contribution_soft.amount',
+ 'headerPattern' => '/total(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Soft Contribution Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'pcp_id' => array(
+ 'name' => 'pcp_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Soft Contribution PCP') ,
+ 'description' => 'FK to civicrm_pcp.id',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_PCP_DAO_PCP',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_pcp',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'pcp_display_in_roll' => array(
+ 'name' => 'pcp_display_in_roll',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Soft Contribution Display on PCP') ,
+ ) ,
+ 'pcp_roll_nickname' => array(
+ 'name' => 'pcp_roll_nickname',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Soft Contribution PCP Nickname') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ ) ,
+ 'pcp_personal_note' => array(
+ 'name' => 'pcp_personal_note',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Soft Contribution PCP Note') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ ) ,
+ 'soft_credit_type_id' => array(
+ 'name' => 'soft_credit_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Soft Credit Type') ,
+ 'description' => 'Soft Credit Type ID.Implicit FK to civicrm_option_value where option_group = soft_credit_type.',
+ 'default' => 'NULL',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'soft_credit_type',
+ 'optionEditPath' => 'civicrm/admin/options/soft_credit_type',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'contribution_soft_id',
+ 'contribution_id' => 'contribution_id',
+ 'contact_id' => 'contribution_soft_contact_id',
+ 'amount' => 'amount',
+ 'currency' => 'currency',
+ 'pcp_id' => 'pcp_id',
+ 'pcp_display_in_roll' => 'pcp_display_in_roll',
+ 'pcp_roll_nickname' => 'pcp_roll_nickname',
+ 'pcp_personal_note' => 'pcp_personal_note',
+ 'soft_credit_type_id' => 'soft_credit_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution_soft'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution_soft'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/Premium.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:aaed45fea2558269a6771ba3480e6b19)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_Premium extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_premiums';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Joins these premium settings to another object. Always civicrm_contribution_page for now.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Is the Premiums feature enabled for this page?
+ *
+ * @var boolean
+ */
+ public $premiums_active;
+ /**
+ * Title for Premiums section.
+ *
+ * @var string
+ */
+ public $premiums_intro_title;
+ /**
+ * Displayed in <div> at top of Premiums section of page. Text and HTML allowed.
+ *
+ * @var text
+ */
+ public $premiums_intro_text;
+ /**
+ * This email address is included in receipts if it is populated and a premium has been selected.
+ *
+ * @var string
+ */
+ public $premiums_contact_email;
+ /**
+ * This phone number is included in receipts if it is populated and a premium has been selected.
+ *
+ * @var string
+ */
+ public $premiums_contact_phone;
+ /**
+ * Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.
+ *
+ * @var boolean
+ */
+ public $premiums_display_min_contribution;
+ /**
+ * Label displayed for No Thank-you option in premiums block (e.g. No thank you)
+ *
+ * @var string
+ */
+ public $premiums_nothankyou_label;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $premiums_nothankyou_position;
+ /**
+ * class constructor
+ *
+ * @return civicrm_premiums
+ */
+ function __construct() {
+ $this->__table = 'civicrm_premiums';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Premium ID') ,
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Premium Entity') ,
+ 'description' => 'Joins these premium settings to another object. Always civicrm_contribution_page for now.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Premium entity ID') ,
+ 'required' => true,
+ ) ,
+ 'premiums_active' => array(
+ 'name' => 'premiums_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Premium Active?') ,
+ 'description' => 'Is the Premiums feature enabled for this page?',
+ 'required' => true,
+ ) ,
+ 'premiums_intro_title' => array(
+ 'name' => 'premiums_intro_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title for Premiums section') ,
+ 'description' => 'Title for Premiums section.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'premiums_intro_text' => array(
+ 'name' => 'premiums_intro_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Premium Introductory Text') ,
+ 'description' => 'Displayed in <div> at top of Premiums section of page. Text and HTML allowed.',
+ ) ,
+ 'premiums_contact_email' => array(
+ 'name' => 'premiums_contact_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Premium Contact Email') ,
+ 'description' => 'This email address is included in receipts if it is populated and a premium has been selected.',
+ 'maxlength' => 100,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'premiums_contact_phone' => array(
+ 'name' => 'premiums_contact_phone',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Premiums Contact Phone') ,
+ 'description' => 'This phone number is included in receipts if it is populated and a premium has been selected.',
+ 'maxlength' => 50,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'premiums_display_min_contribution' => array(
+ 'name' => 'premiums_display_min_contribution',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Display Minimum Contribution?') ,
+ 'description' => 'Boolean. Should we automatically display minimum contribution amount text after the premium descriptions.',
+ 'required' => true,
+ ) ,
+ 'premiums_nothankyou_label' => array(
+ 'name' => 'premiums_nothankyou_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('No Thank-you Text') ,
+ 'description' => 'Label displayed for No Thank-you option in premiums block (e.g. No thank you)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'premiums_nothankyou_position' => array(
+ 'name' => 'premiums_nothankyou_position',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('No Thank-you Position') ,
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'premiums_active' => 'premiums_active',
+ 'premiums_intro_title' => 'premiums_intro_title',
+ 'premiums_intro_text' => 'premiums_intro_text',
+ 'premiums_contact_email' => 'premiums_contact_email',
+ 'premiums_contact_phone' => 'premiums_contact_phone',
+ 'premiums_display_min_contribution' => 'premiums_display_min_contribution',
+ 'premiums_nothankyou_label' => 'premiums_nothankyou_label',
+ 'premiums_nothankyou_position' => 'premiums_nothankyou_position',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['premiums'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['premiums'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/PremiumsProduct.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:16f76907bbd9142b5c8e4820a4bdba34)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_PremiumsProduct extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_premiums_product';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Contribution ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign key to premiums settings record.
+ *
+ * @var int unsigned
+ */
+ public $premiums_id;
+ /**
+ * Foreign key to each product object.
+ *
+ * @var int unsigned
+ */
+ public $product_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $weight;
+ /**
+ * FK to Financial Type.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_premiums_product
+ */
+ function __construct() {
+ $this->__table = 'civicrm_premiums_product';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'premiums_id', 'civicrm_premiums', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'product_id', 'civicrm_product', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Premium Product ID') ,
+ 'description' => 'Contribution ID',
+ 'required' => true,
+ ) ,
+ 'premiums_id' => array(
+ 'name' => 'premiums_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Premium') ,
+ 'description' => 'Foreign key to premiums settings record.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_Premium',
+ ) ,
+ 'product_id' => array(
+ 'name' => 'product_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Product') ,
+ 'description' => 'Foreign key to each product object.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_Product',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'required' => true,
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'premiums_id' => 'premiums_id',
+ 'product_id' => 'product_id',
+ 'weight' => 'weight',
+ 'financial_type_id' => 'financial_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['premiums_product'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['premiums_product'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/Product.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:9907599518b86a4ff232db541df43d85)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_Product extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_product';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Required product/premium name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Optional description of the product/premium.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Optional product sku or code.
+ *
+ * @var string
+ */
+ public $sku;
+ /**
+ * Store comma-delimited list of color, size, etc. options for the product.
+ *
+ * @var text
+ */
+ public $options;
+ /**
+ * Full or relative URL to uploaded image - fullsize.
+ *
+ * @var string
+ */
+ public $image;
+ /**
+ * Full or relative URL to image thumbnail.
+ *
+ * @var string
+ */
+ public $thumbnail;
+ /**
+ * Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.
+ *
+ * @var float
+ */
+ public $price;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * FK to Financial Type.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Minimum contribution required to be eligible to select this premium.
+ *
+ * @var float
+ */
+ public $min_contribution;
+ /**
+ * Actual cost of this product. Useful to determine net return from sale or using this as an incentive.
+ *
+ * @var float
+ */
+ public $cost;
+ /**
+ * Disabling premium removes it from the premiums_premium join table below.
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
+ (e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006)
+ *
+ * @var string
+ */
+ public $period_type;
+ /**
+ * Month and day (MMDD) that fixed period type subscription or membership starts.
+ *
+ * @var int
+ */
+ public $fixed_period_start_day;
+ /**
+ *
+ * @var string
+ */
+ public $duration_unit;
+ /**
+ * Number of units for total duration of subscription, service, membership (e.g. 12 Months).
+ *
+ * @var int
+ */
+ public $duration_interval;
+ /**
+ * Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.
+ *
+ * @var string
+ */
+ public $frequency_unit;
+ /**
+ * Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).
+ *
+ * @var int
+ */
+ public $frequency_interval;
+ /**
+ * class constructor
+ *
+ * @return civicrm_product
+ */
+ function __construct() {
+ $this->__table = 'civicrm_product';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Product ID') ,
+ 'required' => true,
+ ) ,
+ 'product_name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Product Name') ,
+ 'description' => 'Required product/premium name',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'export' => true,
+ 'where' => 'civicrm_product.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Description') ,
+ 'description' => 'Optional description of the product/premium.',
+ ) ,
+ 'sku' => array(
+ 'name' => 'sku',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SKU') ,
+ 'description' => 'Optional product sku or code.',
+ 'maxlength' => 50,
+ 'size' => CRM_Utils_Type::BIG,
+ 'export' => true,
+ 'where' => 'civicrm_product.sku',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'options' => array(
+ 'name' => 'options',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Options') ,
+ 'description' => 'Store comma-delimited list of color, size, etc. options for the product.',
+ ) ,
+ 'image' => array(
+ 'name' => 'image',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Image') ,
+ 'description' => 'Full or relative URL to uploaded image - fullsize.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'thumbnail' => array(
+ 'name' => 'thumbnail',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Thumbnail') ,
+ 'description' => 'Full or relative URL to image thumbnail.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'price' => array(
+ 'name' => 'price',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Price') ,
+ 'description' => 'Sell price or market value for premiums. For tax-deductible contributions, this will be stored as non_deductible_amount in the contribution record.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'min_contribution' => array(
+ 'name' => 'min_contribution',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Minimum Contribution') ,
+ 'description' => 'Minimum contribution required to be eligible to select this premium.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'cost' => array(
+ 'name' => 'cost',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Cost') ,
+ 'description' => 'Actual cost of this product. Useful to determine net return from sale or using this as an incentive.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Disabling premium removes it from the premiums_premium join table below.',
+ 'required' => true,
+ ) ,
+ 'period_type' => array(
+ 'name' => 'period_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Period Type') ,
+ 'description' => 'Rolling means we set start/end based on current day, fixed means we set start/end for current year or month
+ (e.g. 1 year + fixed -> we would set start/end for 1/1/06 thru 12/31/06 for any premium chosen in 2006) ',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'rolling',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::periodType',
+ )
+ ) ,
+ 'fixed_period_start_day' => array(
+ 'name' => 'fixed_period_start_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Fixed Period Start Day') ,
+ 'description' => 'Month and day (MMDD) that fixed period type subscription or membership starts.',
+ 'default' => '0101',
+ ) ,
+ 'duration_unit' => array(
+ 'name' => 'duration_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Duration Unit') ,
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'year',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getPremiumUnits',
+ )
+ ) ,
+ 'duration_interval' => array(
+ 'name' => 'duration_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Duration Interval') ,
+ 'description' => 'Number of units for total duration of subscription, service, membership (e.g. 12 Months).',
+ ) ,
+ 'frequency_unit' => array(
+ 'name' => 'frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Frequency Unit') ,
+ 'description' => 'Frequency unit and interval allow option to store actual delivery frequency for a subscription or service.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'month',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getPremiumUnits',
+ )
+ ) ,
+ 'frequency_interval' => array(
+ 'name' => 'frequency_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Frequency Interval') ,
+ 'description' => 'Number of units for delivery frequency of subscription, service, membership (e.g. every 3 Months).',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'product_name',
+ 'description' => 'description',
+ 'sku' => 'sku',
+ 'options' => 'options',
+ 'image' => 'image',
+ 'thumbnail' => 'thumbnail',
+ 'price' => 'price',
+ 'currency' => 'currency',
+ 'financial_type_id' => 'financial_type_id',
+ 'min_contribution' => 'min_contribution',
+ 'cost' => 'cost',
+ 'is_active' => 'is_active',
+ 'period_type' => 'period_type',
+ 'fixed_period_start_day' => 'fixed_period_start_day',
+ 'duration_unit' => 'duration_unit',
+ 'duration_interval' => 'duration_interval',
+ 'frequency_unit' => 'frequency_unit',
+ 'frequency_interval' => 'frequency_interval',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['product'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['product'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Contribute/Widget.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7414818b41b32e4c0d5a919be3f5f1e5)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Contribute_DAO_Widget extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_contribution_widget';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Contribution Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The Contribution Page which triggered this contribution
+ *
+ * @var int unsigned
+ */
+ public $contribution_page_id;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Widget title.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * URL to Widget logo
+ *
+ * @var string
+ */
+ public $url_logo;
+ /**
+ * Button title.
+ *
+ * @var string
+ */
+ public $button_title;
+ /**
+ * About description.
+ *
+ * @var text
+ */
+ public $about;
+ /**
+ * URL to Homepage.
+ *
+ * @var string
+ */
+ public $url_homepage;
+ /**
+ *
+ * @var string
+ */
+ public $color_title;
+ /**
+ *
+ * @var string
+ */
+ public $color_button;
+ /**
+ *
+ * @var string
+ */
+ public $color_bar;
+ /**
+ *
+ * @var string
+ */
+ public $color_main_text;
+ /**
+ *
+ * @var string
+ */
+ public $color_main;
+ /**
+ *
+ * @var string
+ */
+ public $color_main_bg;
+ /**
+ *
+ * @var string
+ */
+ public $color_bg;
+ /**
+ *
+ * @var string
+ */
+ public $color_about_link;
+ /**
+ *
+ * @var string
+ */
+ public $color_homepage_link;
+ /**
+ * class constructor
+ *
+ * @return civicrm_contribution_widget
+ */
+ function __construct() {
+ $this->__table = 'civicrm_contribution_widget';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_page_id', 'civicrm_contribution_page', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Widget ID') ,
+ 'description' => 'Contribution Id',
+ 'required' => true,
+ ) ,
+ 'contribution_page_id' => array(
+ 'name' => 'contribution_page_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page') ,
+ 'description' => 'The Contribution Page which triggered this contribution',
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Enabled?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Widget Title') ,
+ 'description' => 'Widget title.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_logo' => array(
+ 'name' => 'url_logo',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Widget Image Url') ,
+ 'description' => 'URL to Widget logo',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'button_title' => array(
+ 'name' => 'button_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Button Title') ,
+ 'description' => 'Button title.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'about' => array(
+ 'name' => 'about',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Description') ,
+ 'description' => 'About description.',
+ ) ,
+ 'url_homepage' => array(
+ 'name' => 'url_homepage',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Homepage Url') ,
+ 'description' => 'URL to Homepage.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'color_title' => array(
+ 'name' => 'color_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title Color') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_button' => array(
+ 'name' => 'color_button',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Button Colour') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_bar' => array(
+ 'name' => 'color_bar',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Bar Color') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_main_text' => array(
+ 'name' => 'color_main_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Main Text Color') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_main' => array(
+ 'name' => 'color_main',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Main Colour') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_main_bg' => array(
+ 'name' => 'color_main_bg',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Backgroup Color') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_bg' => array(
+ 'name' => 'color_bg',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Other Backgroun Colour') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_about_link' => array(
+ 'name' => 'color_about_link',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('About Link Colour') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'color_homepage_link' => array(
+ 'name' => 'color_homepage_link',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Homepage Link Colour') ,
+ 'maxlength' => 10,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contribution_page_id' => 'contribution_page_id',
+ 'is_active' => 'is_active',
+ 'title' => 'title',
+ 'url_logo' => 'url_logo',
+ 'button_title' => 'button_title',
+ 'about' => 'about',
+ 'url_homepage' => 'url_homepage',
+ 'color_title' => 'color_title',
+ 'color_button' => 'color_button',
+ 'color_bar' => 'color_bar',
+ 'color_main_text' => 'color_main_text',
+ 'color_main' => 'color_main',
+ 'color_main_bg' => 'color_main_bg',
+ 'color_bg' => 'color_bg',
+ 'color_about_link' => 'color_about_link',
+ 'color_homepage_link' => 'color_homepage_link',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['contribution_widget'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['contribution_widget'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/ActionLog.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:06f1af79fd11558c32551e9cb27e4db8)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_ActionLog extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_action_log';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to id of the entity that the action was performed on. Pseudo - FK.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to the action schedule that this action originated from.
+ *
+ * @var int unsigned
+ */
+ public $action_schedule_id;
+ /**
+ * date time that the action was performed on.
+ *
+ * @var datetime
+ */
+ public $action_date_time;
+ /**
+ * Was there any error sending the reminder?
+ *
+ * @var boolean
+ */
+ public $is_error;
+ /**
+ * Description / text in case there was an error encountered.
+ *
+ * @var text
+ */
+ public $message;
+ /**
+ * Keeps track of the sequence number of this repetition.
+ *
+ * @var int unsigned
+ */
+ public $repetition_number;
+ /**
+ * Stores the date from the entity which triggered this reminder action (e.g. membership.end_date for most membership renewal reminders)
+ *
+ * @var date
+ */
+ public $reference_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_action_log
+ */
+ function __construct() {
+ $this->__table = 'civicrm_action_log';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'action_schedule_id', 'civicrm_action_schedule', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Action Schedule ID') ,
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Action Schedule Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'FK to id of the entity that the action was performed on. Pseudo - FK.',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'name of the entity table for the above id, e.g. civicrm_activity, civicrm_participant',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'action_schedule_id' => array(
+ 'name' => 'action_schedule_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Schedule') ,
+ 'description' => 'FK to the action schedule that this action originated from.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_ActionSchedule',
+ ) ,
+ 'action_date_time' => array(
+ 'name' => 'action_date_time',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Action Date And Time') ,
+ 'description' => 'date time that the action was performed on.',
+ ) ,
+ 'is_error' => array(
+ 'name' => 'is_error',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Error?') ,
+ 'description' => 'Was there any error sending the reminder?',
+ ) ,
+ 'message' => array(
+ 'name' => 'message',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Message') ,
+ 'description' => 'Description / text in case there was an error encountered.',
+ ) ,
+ 'repetition_number' => array(
+ 'name' => 'repetition_number',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Repetition Number') ,
+ 'description' => 'Keeps track of the sequence number of this repetition.',
+ ) ,
+ 'reference_date' => array(
+ 'name' => 'reference_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Reference Date') ,
+ 'description' => 'Stores the date from the entity which triggered this reminder action (e.g. membership.end_date for most membership renewal reminders)',
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'entity_id' => 'entity_id',
+ 'entity_table' => 'entity_table',
+ 'action_schedule_id' => 'action_schedule_id',
+ 'action_date_time' => 'action_date_time',
+ 'is_error' => 'is_error',
+ 'message' => 'message',
+ 'repetition_number' => 'repetition_number',
+ 'reference_date' => 'reference_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['action_log'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['action_log'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/ActionMapping.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:5c50df10647356b908eaa6670f731b38)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_ActionMapping extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_action_mapping';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Entity for which the reminder is created
+ *
+ * @var string
+ */
+ public $entity;
+ /**
+ * Entity value
+ *
+ * @var string
+ */
+ public $entity_value;
+ /**
+ * Entity value label
+ *
+ * @var string
+ */
+ public $entity_value_label;
+ /**
+ * Entity status
+ *
+ * @var string
+ */
+ public $entity_status;
+ /**
+ * Entity status label
+ *
+ * @var string
+ */
+ public $entity_status_label;
+ /**
+ * Entity date
+ *
+ * @var string
+ */
+ public $entity_date_start;
+ /**
+ * Entity date
+ *
+ * @var string
+ */
+ public $entity_date_end;
+ /**
+ * Entity recipient
+ *
+ * @var string
+ */
+ public $entity_recipient;
+ /**
+ * class constructor
+ *
+ * @return civicrm_action_mapping
+ */
+ function __construct() {
+ $this->__table = 'civicrm_action_mapping';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Action Mapping ID') ,
+ 'required' => true,
+ ) ,
+ 'entity' => array(
+ 'name' => 'entity',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Action Mapping Entity') ,
+ 'description' => 'Entity for which the reminder is created',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_value' => array(
+ 'name' => 'entity_value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Action Mapping Entity Value') ,
+ 'description' => 'Entity value',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_value_label' => array(
+ 'name' => 'entity_value_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Value Label') ,
+ 'description' => 'Entity value label',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_status' => array(
+ 'name' => 'entity_status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Status') ,
+ 'description' => 'Entity status',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_status_label' => array(
+ 'name' => 'entity_status_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Status Label') ,
+ 'description' => 'Entity status label',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_date_start' => array(
+ 'name' => 'entity_date_start',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Start Date') ,
+ 'description' => 'Entity date',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_date_end' => array(
+ 'name' => 'entity_date_end',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity End Date') ,
+ 'description' => 'Entity date',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_recipient' => array(
+ 'name' => 'entity_recipient',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Recipient') ,
+ 'description' => 'Entity recipient',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity' => 'entity',
+ 'entity_value' => 'entity_value',
+ 'entity_value_label' => 'entity_value_label',
+ 'entity_status' => 'entity_status',
+ 'entity_status_label' => 'entity_status_label',
+ 'entity_date_start' => 'entity_date_start',
+ 'entity_date_end' => 'entity_date_end',
+ 'entity_recipient' => 'entity_recipient',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['action_mapping'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['action_mapping'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/ActionSchedule.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:f71bec9995eb3968faf7ccfba01950b2)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_ActionSchedule extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_action_schedule';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the action(reminder)
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Title of the action(reminder)
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Recipient
+ *
+ * @var string
+ */
+ public $recipient;
+ /**
+ * Is this the recipient criteria limited to OR in addition to?
+ *
+ * @var boolean
+ */
+ public $limit_to;
+ /**
+ * Entity value
+ *
+ * @var string
+ */
+ public $entity_value;
+ /**
+ * Entity status
+ *
+ * @var string
+ */
+ public $entity_status;
+ /**
+ * Reminder Interval.
+ *
+ * @var int unsigned
+ */
+ public $start_action_offset;
+ /**
+ * Time units for reminder.
+ *
+ * @var string
+ */
+ public $start_action_unit;
+ /**
+ * Reminder Action
+ *
+ * @var string
+ */
+ public $start_action_condition;
+ /**
+ * Entity date
+ *
+ * @var string
+ */
+ public $start_action_date;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_repeat;
+ /**
+ * Time units for repetition of reminder.
+ *
+ * @var string
+ */
+ public $repetition_frequency_unit;
+ /**
+ * Time interval for repeating the reminder.
+ *
+ * @var int unsigned
+ */
+ public $repetition_frequency_interval;
+ /**
+ * Time units till repetition of reminder.
+ *
+ * @var string
+ */
+ public $end_frequency_unit;
+ /**
+ * Time interval till repeating the reminder.
+ *
+ * @var int unsigned
+ */
+ public $end_frequency_interval;
+ /**
+ * Reminder Action till repeating the reminder.
+ *
+ * @var string
+ */
+ public $end_action;
+ /**
+ * Entity end date
+ *
+ * @var string
+ */
+ public $end_date;
+ /**
+ * Is this option active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Contact IDs to which reminder should be sent.
+ *
+ * @var string
+ */
+ public $recipient_manual;
+ /**
+ * listing based on recipient field.
+ *
+ * @var string
+ */
+ public $recipient_listing;
+ /**
+ * Body of the mailing in text format.
+ *
+ * @var longtext
+ */
+ public $body_text;
+ /**
+ * Body of the mailing in html format.
+ *
+ * @var longtext
+ */
+ public $body_html;
+ /**
+ * Content of the SMS text.
+ *
+ * @var longtext
+ */
+ public $sms_body_text;
+ /**
+ * Subject of mailing
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Record Activity for this reminder?
+ *
+ * @var boolean
+ */
+ public $record_activity;
+ /**
+ * Name/ID of the mapping to use on this table
+ *
+ * @var string
+ */
+ public $mapping_id;
+ /**
+ * FK to Group
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * FK to the message template.
+ *
+ * @var int unsigned
+ */
+ public $msg_template_id;
+ /**
+ * FK to the message template.
+ *
+ * @var int unsigned
+ */
+ public $sms_template_id;
+ /**
+ * Date on which the reminder be sent.
+ *
+ * @var date
+ */
+ public $absolute_date;
+ /**
+ * Name in "from" field
+ *
+ * @var string
+ */
+ public $from_name;
+ /**
+ * Email address in "from" field
+ *
+ * @var string
+ */
+ public $from_email;
+ /**
+ * Send the message as email or sms or both.
+ *
+ * @var string
+ */
+ public $mode;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $sms_provider_id;
+ /**
+ * Used for repeating entity
+ *
+ * @var string
+ */
+ public $used_for;
+ /**
+ * Used for multilingual installation
+ *
+ * @var string
+ */
+ public $filter_contact_language;
+ /**
+ * Used for multilingual installation
+ *
+ * @var string
+ */
+ public $communication_language;
+ /**
+ * class constructor
+ *
+ * @return civicrm_action_schedule
+ */
+ function __construct() {
+ $this->__table = 'civicrm_action_schedule';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'msg_template_id', 'civicrm_msg_template', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'sms_template_id', 'civicrm_msg_template', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'sms_provider_id', 'civicrm_sms_provider', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Action Schedule ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Name of the action(reminder)',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title') ,
+ 'description' => 'Title of the action(reminder)',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'recipient' => array(
+ 'name' => 'recipient',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Recipient') ,
+ 'description' => 'Recipient',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'limit_to' => array(
+ 'name' => 'limit_to',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Limit To') ,
+ 'description' => 'Is this the recipient criteria limited to OR in addition to?',
+ ) ,
+ 'entity_value' => array(
+ 'name' => 'entity_value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Value') ,
+ 'description' => 'Entity value',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'entity_status' => array(
+ 'name' => 'entity_status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Status') ,
+ 'description' => 'Entity status',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'start_action_offset' => array(
+ 'name' => 'start_action_offset',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Start Action Offset') ,
+ 'description' => 'Reminder Interval.',
+ ) ,
+ 'start_action_unit' => array(
+ 'name' => 'start_action_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Start Action Unit') ,
+ 'description' => 'Time units for reminder.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
+ )
+ ) ,
+ 'start_action_condition' => array(
+ 'name' => 'start_action_condition',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Start Action Condition') ,
+ 'description' => 'Reminder Action',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'start_action_date' => array(
+ 'name' => 'start_action_date',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Start Action Date') ,
+ 'description' => 'Entity date',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'is_repeat' => array(
+ 'name' => 'is_repeat',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Repeat?') ,
+ ) ,
+ 'repetition_frequency_unit' => array(
+ 'name' => 'repetition_frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Repetition Frequency Unit') ,
+ 'description' => 'Time units for repetition of reminder.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
+ )
+ ) ,
+ 'repetition_frequency_interval' => array(
+ 'name' => 'repetition_frequency_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Repetition Frequency Interval') ,
+ 'description' => 'Time interval for repeating the reminder.',
+ ) ,
+ 'end_frequency_unit' => array(
+ 'name' => 'end_frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('End Frequency Unit') ,
+ 'description' => 'Time units till repetition of reminder.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getRecurringFrequencyUnits',
+ )
+ ) ,
+ 'end_frequency_interval' => array(
+ 'name' => 'end_frequency_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('End Frequency Interval') ,
+ 'description' => 'Time interval till repeating the reminder.',
+ ) ,
+ 'end_action' => array(
+ 'name' => 'end_action',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('End Action') ,
+ 'description' => 'Reminder Action till repeating the reminder.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('End Date') ,
+ 'description' => 'Entity end date',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Schedule is Active?') ,
+ 'description' => 'Is this option active?',
+ 'default' => '1',
+ ) ,
+ 'recipient_manual' => array(
+ 'name' => 'recipient_manual',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Recipient Manual') ,
+ 'description' => 'Contact IDs to which reminder should be sent.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'recipient_listing' => array(
+ 'name' => 'recipient_listing',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Recipient Listing') ,
+ 'description' => 'listing based on recipient field.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'body_text' => array(
+ 'name' => 'body_text',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Reminder Text') ,
+ 'description' => 'Body of the mailing in text format.',
+ ) ,
+ 'body_html' => array(
+ 'name' => 'body_html',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Reminder HTML') ,
+ 'description' => 'Body of the mailing in html format.',
+ ) ,
+ 'sms_body_text' => array(
+ 'name' => 'sms_body_text',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('SMS Reminder Text') ,
+ 'description' => 'Content of the SMS text.',
+ ) ,
+ 'subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Reminder Subject') ,
+ 'description' => 'Subject of mailing',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'record_activity' => array(
+ 'name' => 'record_activity',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Record Activity for Reminder?') ,
+ 'description' => 'Record Activity for this reminder?',
+ 'default' => 'NULL',
+ ) ,
+ 'mapping_id' => array(
+ 'name' => 'mapping_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Reminder Mapping') ,
+ 'description' => 'Name/ID of the mapping to use on this table',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Reminder Group') ,
+ 'description' => 'FK to Group',
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'msg_template_id' => array(
+ 'name' => 'msg_template_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Reminder Template') ,
+ 'description' => 'FK to the message template.',
+ 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
+ ) ,
+ 'sms_template_id' => array(
+ 'name' => 'sms_template_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('SMS Reminder Template') ,
+ 'description' => 'FK to the message template.',
+ 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
+ ) ,
+ 'absolute_date' => array(
+ 'name' => 'absolute_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Fixed Date for Reminder') ,
+ 'description' => 'Date on which the reminder be sent.',
+ ) ,
+ 'from_name' => array(
+ 'name' => 'from_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Reminder from Name') ,
+ 'description' => 'Name in "from" field',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'from_email' => array(
+ 'name' => 'from_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Reminder From Email') ,
+ 'description' => 'Email address in "from" field',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'mode' => array(
+ 'name' => 'mode',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Message Mode') ,
+ 'description' => 'Send the message as email or sms or both.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'Email',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'msg_mode',
+ 'optionEditPath' => 'civicrm/admin/options/msg_mode',
+ )
+ ) ,
+ 'sms_provider_id' => array(
+ 'name' => 'sms_provider_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('SMS Provider') ,
+ 'FKClassName' => 'CRM_SMS_DAO_Provider',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'used_for' => array(
+ 'name' => 'used_for',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Used For') ,
+ 'description' => 'Used for repeating entity',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'filter_contact_language' => array(
+ 'name' => 'filter_contact_language',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Filter Contact Language') ,
+ 'description' => 'Used for multilingual installation',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'communication_language' => array(
+ 'name' => 'communication_language',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Communication Language') ,
+ 'description' => 'Used for multilingual installation',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'recipient' => 'recipient',
+ 'limit_to' => 'limit_to',
+ 'entity_value' => 'entity_value',
+ 'entity_status' => 'entity_status',
+ 'start_action_offset' => 'start_action_offset',
+ 'start_action_unit' => 'start_action_unit',
+ 'start_action_condition' => 'start_action_condition',
+ 'start_action_date' => 'start_action_date',
+ 'is_repeat' => 'is_repeat',
+ 'repetition_frequency_unit' => 'repetition_frequency_unit',
+ 'repetition_frequency_interval' => 'repetition_frequency_interval',
+ 'end_frequency_unit' => 'end_frequency_unit',
+ 'end_frequency_interval' => 'end_frequency_interval',
+ 'end_action' => 'end_action',
+ 'end_date' => 'end_date',
+ 'is_active' => 'is_active',
+ 'recipient_manual' => 'recipient_manual',
+ 'recipient_listing' => 'recipient_listing',
+ 'body_text' => 'body_text',
+ 'body_html' => 'body_html',
+ 'sms_body_text' => 'sms_body_text',
+ 'subject' => 'subject',
+ 'record_activity' => 'record_activity',
+ 'mapping_id' => 'mapping_id',
+ 'group_id' => 'group_id',
+ 'msg_template_id' => 'msg_template_id',
+ 'sms_template_id' => 'sms_template_id',
+ 'absolute_date' => 'absolute_date',
+ 'from_name' => 'from_name',
+ 'from_email' => 'from_email',
+ 'mode' => 'mode',
+ 'sms_provider_id' => 'sms_provider_id',
+ 'used_for' => 'used_for',
+ 'filter_contact_language' => 'filter_contact_language',
+ 'communication_language' => 'communication_language',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['action_schedule'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['action_schedule'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Address.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:8b9654a6e43f3c24966929b6d7889885)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+require_once 'CRM/Core/DAO/County.php';
+require_once 'CRM/Core/DAO/StateProvince.php';
+require_once 'CRM/Core/DAO/Country.php';
+class CRM_Core_DAO_Address extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_address';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Address ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Which Location does this address belong to.
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * Is this the primary address.
+ *
+ * @var boolean
+ */
+ public $is_primary;
+ /**
+ * Is this the billing address.
+ *
+ * @var boolean
+ */
+ public $is_billing;
+ /**
+ * Concatenation of all routable street address components (prefix, street number, street name, suffix, unit
+ number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail
+ delivery, etc.).
+ *
+ * @var string
+ */
+ public $street_address;
+ /**
+ * Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.
+ *
+ * @var int
+ */
+ public $street_number;
+ /**
+ * Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A
+ *
+ * @var string
+ */
+ public $street_number_suffix;
+ /**
+ * Directional prefix, e.g. SE Main St, SE is the prefix.
+ *
+ * @var string
+ */
+ public $street_number_predirectional;
+ /**
+ * Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.
+ *
+ * @var string
+ */
+ public $street_name;
+ /**
+ * St, Rd, Dr, etc.
+ *
+ * @var string
+ */
+ public $street_type;
+ /**
+ * Directional prefix, e.g. Main St S, S is the suffix.
+ *
+ * @var string
+ */
+ public $street_number_postdirectional;
+ /**
+ * Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200
+ *
+ * @var string
+ */
+ public $street_unit;
+ /**
+ * Supplemental Address Information, Line 1
+ *
+ * @var string
+ */
+ public $supplemental_address_1;
+ /**
+ * Supplemental Address Information, Line 2
+ *
+ * @var string
+ */
+ public $supplemental_address_2;
+ /**
+ * Supplemental Address Information, Line 3
+ *
+ * @var string
+ */
+ public $supplemental_address_3;
+ /**
+ * City, Town or Village Name.
+ *
+ * @var string
+ */
+ public $city;
+ /**
+ * Which County does this address belong to.
+ *
+ * @var int unsigned
+ */
+ public $county_id;
+ /**
+ * Which State_Province does this address belong to.
+ *
+ * @var int unsigned
+ */
+ public $state_province_id;
+ /**
+ * Store the suffix, like the +4 part in the USPS system.
+ *
+ * @var string
+ */
+ public $postal_code_suffix;
+ /**
+ * Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.
+ *
+ * @var string
+ */
+ public $postal_code;
+ /**
+ * USPS Bulk mailing code.
+ *
+ * @var string
+ */
+ public $usps_adc;
+ /**
+ * Which Country does this address belong to.
+ *
+ * @var int unsigned
+ */
+ public $country_id;
+ /**
+ * Latitude
+ *
+ * @var float
+ */
+ public $geo_code_1;
+ /**
+ * Longitude
+ *
+ * @var float
+ */
+ public $geo_code_2;
+ /**
+ * Is this a manually entered geo code
+ *
+ * @var boolean
+ */
+ public $manual_geo_code;
+ /**
+ * Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".
+ *
+ * @var string
+ */
+ public $timezone;
+ /**
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * FK to Address ID
+ *
+ * @var int unsigned
+ */
+ public $master_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_address
+ */
+ function __construct() {
+ $this->__table = 'civicrm_address';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'county_id', 'civicrm_county', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'state_province_id', 'civicrm_state_province', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'country_id', 'civicrm_country', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'master_id', 'civicrm_address', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Address ID') ,
+ 'description' => 'Unique Address ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Address Location Type') ,
+ 'description' => 'Which Location does this address belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_location_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'display_name',
+ )
+ ) ,
+ 'is_primary' => array(
+ 'name' => 'is_primary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Address Primary?') ,
+ 'description' => 'Is this the primary address.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_billing' => array(
+ 'name' => 'is_billing',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Billing Address') ,
+ 'description' => 'Is this the billing address.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'street_address' => array(
+ 'name' => 'street_address',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Address') ,
+ 'description' => 'Concatenation of all routable street address components (prefix, street number, street name, suffix, unit
+ number OR P.O. Box). Apps should be able to determine physical location with this data (for mapping, mail
+ delivery, etc.).
+ ',
+ 'maxlength' => 96,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_address.street_address',
+ 'headerPattern' => '/(street|address)/i',
+ 'dataPattern' => '/^(\d{1,5}( [0-9A-Za-z]+)+)$|^(P\.?O\.\? Box \d{1,5})$/i',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_number' => array(
+ 'name' => 'street_number',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Street Number') ,
+ 'description' => 'Numeric portion of address number on the street, e.g. For 112A Main St, the street_number = 112.',
+ 'export' => true,
+ 'where' => 'civicrm_address.street_number',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_number_suffix' => array(
+ 'name' => 'street_number_suffix',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Number Suffix') ,
+ 'description' => 'Non-numeric portion of address number on the street, e.g. For 112A Main St, the street_number_suffix = A
+ ',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'export' => true,
+ 'where' => 'civicrm_address.street_number_suffix',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_number_predirectional' => array(
+ 'name' => 'street_number_predirectional',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Direction Prefix') ,
+ 'description' => 'Directional prefix, e.g. SE Main St, SE is the prefix.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_name' => array(
+ 'name' => 'street_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Name') ,
+ 'description' => 'Actual street name, excluding St, Dr, Rd, Ave, e.g. For 112 Main St, the street_name = Main.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'export' => true,
+ 'where' => 'civicrm_address.street_name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_type' => array(
+ 'name' => 'street_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Type') ,
+ 'description' => 'St, Rd, Dr, etc.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_number_postdirectional' => array(
+ 'name' => 'street_number_postdirectional',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Direction Suffix') ,
+ 'description' => 'Directional prefix, e.g. Main St S, S is the suffix.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'street_unit' => array(
+ 'name' => 'street_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Street Unit') ,
+ 'description' => 'Secondary unit designator, e.g. Apt 3 or Unit # 14, or Bldg 1200',
+ 'maxlength' => 16,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'export' => true,
+ 'where' => 'civicrm_address.street_unit',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'supplemental_address_1' => array(
+ 'name' => 'supplemental_address_1',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Supplemental Address 1') ,
+ 'description' => 'Supplemental Address Information, Line 1',
+ 'maxlength' => 96,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_address.supplemental_address_1',
+ 'headerPattern' => '/(supplemental(\s)?)?address(\s\d+)?/i',
+ 'dataPattern' => '/unit|ap(ar)?t(ment)?\s(\d|\w)+/i',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'supplemental_address_2' => array(
+ 'name' => 'supplemental_address_2',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Supplemental Address 2') ,
+ 'description' => 'Supplemental Address Information, Line 2',
+ 'maxlength' => 96,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_address.supplemental_address_2',
+ 'headerPattern' => '/(supplemental(\s)?)?address(\s\d+)?/i',
+ 'dataPattern' => '/unit|ap(ar)?t(ment)?\s(\d|\w)+/i',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'supplemental_address_3' => array(
+ 'name' => 'supplemental_address_3',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Supplemental Address 3') ,
+ 'description' => 'Supplemental Address Information, Line 3',
+ 'maxlength' => 96,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'city' => array(
+ 'name' => 'city',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('City') ,
+ 'description' => 'City, Town or Village Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_address.city',
+ 'headerPattern' => '/city/i',
+ 'dataPattern' => '/^[A-Za-z]+(\.?)(\s?[A-Za-z]+){0,2}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'county_id' => array(
+ 'name' => 'county_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('County') ,
+ 'description' => 'Which County does this address belong to.',
+ 'FKClassName' => 'CRM_Core_DAO_County',
+ 'html' => array(
+ 'type' => 'ChainSelect',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_county',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'state_province_id' => array(
+ 'name' => 'state_province_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('State/Province') ,
+ 'description' => 'Which State_Province does this address belong to.',
+ 'FKClassName' => 'CRM_Core_DAO_StateProvince',
+ 'html' => array(
+ 'type' => 'ChainSelect',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_state_province',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'postal_code_suffix' => array(
+ 'name' => 'postal_code_suffix',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Postal Code Suffix') ,
+ 'description' => 'Store the suffix, like the +4 part in the USPS system.',
+ 'maxlength' => 12,
+ 'size' => 3,
+ 'import' => true,
+ 'where' => 'civicrm_address.postal_code_suffix',
+ 'headerPattern' => '/p(ostal)\sc(ode)\ss(uffix)/i',
+ 'dataPattern' => '/\d?\d{4}(-\d{4})?/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'postal_code' => array(
+ 'name' => 'postal_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Postal Code') ,
+ 'description' => 'Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.',
+ 'maxlength' => 64,
+ 'size' => 6,
+ 'import' => true,
+ 'where' => 'civicrm_address.postal_code',
+ 'headerPattern' => '/postal|zip/i',
+ 'dataPattern' => '/\d?\d{4}(-\d{4})?/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'usps_adc' => array(
+ 'name' => 'usps_adc',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('USPS Code') ,
+ 'description' => 'USPS Bulk mailing code.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'country_id' => array(
+ 'name' => 'country_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Country') ,
+ 'description' => 'Which Country does this address belong to.',
+ 'FKClassName' => 'CRM_Core_DAO_Country',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_country',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ 'nameColumn' => 'iso_code',
+ )
+ ) ,
+ 'geo_code_1' => array(
+ 'name' => 'geo_code_1',
+ 'type' => CRM_Utils_Type::T_FLOAT,
+ 'title' => ts('Latitude') ,
+ 'description' => 'Latitude',
+ 'import' => true,
+ 'where' => 'civicrm_address.geo_code_1',
+ 'headerPattern' => '/geo/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'geo_code_2' => array(
+ 'name' => 'geo_code_2',
+ 'type' => CRM_Utils_Type::T_FLOAT,
+ 'title' => ts('Longitude') ,
+ 'description' => 'Longitude',
+ 'import' => true,
+ 'where' => 'civicrm_address.geo_code_2',
+ 'headerPattern' => '/geo/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'manual_geo_code' => array(
+ 'name' => 'manual_geo_code',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is manually geocoded') ,
+ 'description' => 'Is this a manually entered geo code',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'timezone' => array(
+ 'name' => 'timezone',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Timezone') ,
+ 'description' => 'Timezone expressed as a UTC offset - e.g. United States CST would be written as "UTC-6".',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'address_name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Address Name') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_address.name',
+ 'headerPattern' => '/^location|(l(ocation\s)?name)$/i',
+ 'dataPattern' => '/^\w+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'master_id' => array(
+ 'name' => 'master_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Master Address Belongs To') ,
+ 'description' => 'FK to Address ID',
+ 'import' => true,
+ 'where' => 'civicrm_address.master_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Address',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'location_type_id' => 'location_type_id',
+ 'is_primary' => 'is_primary',
+ 'is_billing' => 'is_billing',
+ 'street_address' => 'street_address',
+ 'street_number' => 'street_number',
+ 'street_number_suffix' => 'street_number_suffix',
+ 'street_number_predirectional' => 'street_number_predirectional',
+ 'street_name' => 'street_name',
+ 'street_type' => 'street_type',
+ 'street_number_postdirectional' => 'street_number_postdirectional',
+ 'street_unit' => 'street_unit',
+ 'supplemental_address_1' => 'supplemental_address_1',
+ 'supplemental_address_2' => 'supplemental_address_2',
+ 'supplemental_address_3' => 'supplemental_address_3',
+ 'city' => 'city',
+ 'county_id' => 'county_id',
+ 'state_province_id' => 'state_province_id',
+ 'postal_code_suffix' => 'postal_code_suffix',
+ 'postal_code' => 'postal_code',
+ 'usps_adc' => 'usps_adc',
+ 'country_id' => 'country_id',
+ 'geo_code_1' => 'geo_code_1',
+ 'geo_code_2' => 'geo_code_2',
+ 'manual_geo_code' => 'manual_geo_code',
+ 'timezone' => 'timezone',
+ 'name' => 'address_name',
+ 'master_id' => 'master_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['address'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ self::$_import = array_merge(self::$_import, CRM_Core_DAO_County::import(true));
+ self::$_import = array_merge(self::$_import, CRM_Core_DAO_StateProvince::import(true));
+ self::$_import = array_merge(self::$_import, CRM_Core_DAO_Country::import(true));
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['address'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ self::$_export = array_merge(self::$_export, CRM_Core_DAO_County::export(true));
+ self::$_export = array_merge(self::$_export, CRM_Core_DAO_StateProvince::export(true));
+ self::$_export = array_merge(self::$_export, CRM_Core_DAO_Country::export(true));
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/AddressFormat.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:ab9f0a517aa2c23031b0a3e53c4e6daa)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_AddressFormat extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_address_format';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Address Format Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The format of an address
+ *
+ * @var text
+ */
+ public $format;
+ /**
+ * class constructor
+ *
+ * @return civicrm_address_format
+ */
+ function __construct() {
+ $this->__table = 'civicrm_address_format';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Address Format ID') ,
+ 'description' => 'Address Format Id',
+ 'required' => true,
+ ) ,
+ 'format' => array(
+ 'name' => 'format',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Address Format') ,
+ 'description' => 'The format of an address',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'format' => 'format',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['address_format'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['address_format'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Cache.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:952552e8514aaf6a180fd6aeb3dd67b3)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Cache extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_cache';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * group name for cache element, useful in cleaning cache elements
+ *
+ * @var string
+ */
+ public $group_name;
+ /**
+ * Unique path name for cache element
+ *
+ * @var string
+ */
+ public $path;
+ /**
+ * data associated with this path
+ *
+ * @var longtext
+ */
+ public $data;
+ /**
+ * Component that this menu item belongs to
+ *
+ * @var int unsigned
+ */
+ public $component_id;
+ /**
+ * When was the cache item created
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * When should the cache item expire
+ *
+ * @var datetime
+ */
+ public $expired_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_cache
+ */
+ function __construct() {
+ $this->__table = 'civicrm_cache';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'component_id', 'civicrm_component', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'required' => true,
+ ) ,
+ 'group_name' => array(
+ 'name' => 'group_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Group Name') ,
+ 'description' => 'group name for cache element, useful in cleaning cache elements',
+ 'required' => true,
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'path' => array(
+ 'name' => 'path',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Path') ,
+ 'description' => 'Unique path name for cache element',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Data') ,
+ 'description' => 'data associated with this path',
+ ) ,
+ 'component_id' => array(
+ 'name' => 'component_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'description' => 'Component that this menu item belongs to',
+ 'FKClassName' => 'CRM_Core_DAO_Component',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Created Date') ,
+ 'description' => 'When was the cache item created',
+ ) ,
+ 'expired_date' => array(
+ 'name' => 'expired_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Expired Date') ,
+ 'description' => 'When should the cache item expire',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'group_name' => 'group_name',
+ 'path' => 'path',
+ 'data' => 'data',
+ 'component_id' => 'component_id',
+ 'created_date' => 'created_date',
+ 'expired_date' => 'expired_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['cache'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['cache'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Component.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:274cffd1bd469e5cba83dc3c25ab2f8c)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Component extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_component';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Component ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the component.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Path to components main directory in a form of a class
+ namespace.
+ *
+ * @var string
+ */
+ public $namespace;
+ /**
+ * class constructor
+ *
+ * @return civicrm_component
+ */
+ function __construct() {
+ $this->__table = 'civicrm_component';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'description' => 'Component ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Component name') ,
+ 'description' => 'Name of the component.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'namespace' => array(
+ 'name' => 'namespace',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Namespace reserved for component.') ,
+ 'description' => 'Path to components main directory in a form of a class
+ namespace.
+ ',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'namespace' => 'namespace',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['component'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['component'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Country.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:640d17a50f287bff009c7a164982aa20)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Country extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_country';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Country Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Country Name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * ISO Code
+ *
+ * @var string
+ */
+ public $iso_code;
+ /**
+ * National prefix to be used when dialing TO this country.
+ *
+ * @var string
+ */
+ public $country_code;
+ /**
+ * Foreign key to civicrm_address_format.id.
+ *
+ * @var int unsigned
+ */
+ public $address_format_id;
+ /**
+ * International direct dialing prefix from within the country TO another country
+ *
+ * @var string
+ */
+ public $idd_prefix;
+ /**
+ * Access prefix to call within a country to a different area
+ *
+ * @var string
+ */
+ public $ndd_prefix;
+ /**
+ * Foreign key to civicrm_worldregion.id.
+ *
+ * @var int unsigned
+ */
+ public $region_id;
+ /**
+ * Should state/province be displayed as abbreviation for contacts from this country?
+ *
+ * @var boolean
+ */
+ public $is_province_abbreviated;
+ /**
+ * class constructor
+ *
+ * @return civicrm_country
+ */
+ function __construct() {
+ $this->__table = 'civicrm_country';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'address_format_id', 'civicrm_address_format', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'region_id', 'civicrm_worldregion', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Country ID') ,
+ 'description' => 'Country Id',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Country') ,
+ 'description' => 'Country Name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_country.name',
+ 'headerPattern' => '/country/i',
+ 'dataPattern' => '/^[A-Z][a-z]+\.?(\s+[A-Z][a-z]+){0,3}$/',
+ 'export' => true,
+ ) ,
+ 'iso_code' => array(
+ 'name' => 'iso_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Country ISO Code') ,
+ 'description' => 'ISO Code',
+ 'maxlength' => 2,
+ 'size' => CRM_Utils_Type::TWO,
+ ) ,
+ 'country_code' => array(
+ 'name' => 'country_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Country Phone Prefix') ,
+ 'description' => 'National prefix to be used when dialing TO this country.',
+ 'maxlength' => 4,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'address_format_id' => array(
+ 'name' => 'address_format_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Address Format') ,
+ 'description' => 'Foreign key to civicrm_address_format.id.',
+ 'FKClassName' => 'CRM_Core_DAO_AddressFormat',
+ ) ,
+ 'idd_prefix' => array(
+ 'name' => 'idd_prefix',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Outgoing Phone Prefix') ,
+ 'description' => 'International direct dialing prefix from within the country TO another country',
+ 'maxlength' => 4,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'ndd_prefix' => array(
+ 'name' => 'ndd_prefix',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Area Code') ,
+ 'description' => 'Access prefix to call within a country to a different area',
+ 'maxlength' => 4,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'region_id' => array(
+ 'name' => 'region_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Region') ,
+ 'description' => 'Foreign key to civicrm_worldregion.id.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Worldregion',
+ ) ,
+ 'is_province_abbreviated' => array(
+ 'name' => 'is_province_abbreviated',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Abbreviate Province?') ,
+ 'description' => 'Should state/province be displayed as abbreviation for contacts from this country?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'iso_code' => 'iso_code',
+ 'country_code' => 'country_code',
+ 'address_format_id' => 'address_format_id',
+ 'idd_prefix' => 'idd_prefix',
+ 'ndd_prefix' => 'ndd_prefix',
+ 'region_id' => 'region_id',
+ 'is_province_abbreviated' => 'is_province_abbreviated',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['country'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['country'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/County.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:42332b390eea151b3de118669cf09963)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_County extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_county';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * County ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of County
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * 2-4 Character Abbreviation of County
+ *
+ * @var string
+ */
+ public $abbreviation;
+ /**
+ * ID of State/Province that County belongs
+ *
+ * @var int unsigned
+ */
+ public $state_province_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_county
+ */
+ function __construct() {
+ $this->__table = 'civicrm_county';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'state_province_id', 'civicrm_state_province', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('County ID') ,
+ 'description' => 'County ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('County') ,
+ 'description' => 'Name of County',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_county.name',
+ 'headerPattern' => '/county/i',
+ 'dataPattern' => '/[A-Z]{2}/',
+ 'export' => true,
+ ) ,
+ 'abbreviation' => array(
+ 'name' => 'abbreviation',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('County Abbreviation') ,
+ 'description' => '2-4 Character Abbreviation of County',
+ 'maxlength' => 4,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'state_province_id' => array(
+ 'name' => 'state_province_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('State') ,
+ 'description' => 'ID of State/Province that County belongs',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_StateProvince',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'abbreviation' => 'abbreviation',
+ 'state_province_id' => 'state_province_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['county'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['county'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/CustomField.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:6a42b0de2b1ae749ef42f35a96b7b99f)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_CustomField extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_custom_field';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Custom Field ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_custom_group.
+ *
+ * @var int unsigned
+ */
+ public $custom_group_id;
+ /**
+ * Variable name/programmatic handle for this group.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Text for form field label (also friendly name for administering this custom property).
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * Controls location of data storage in extended_data table.
+ *
+ * @var string
+ */
+ public $data_type;
+ /**
+ * HTML types plus several built-in extended types.
+ *
+ * @var string
+ */
+ public $html_type;
+ /**
+ * Use form_options.is_default for field_types which use options.
+ *
+ * @var string
+ */
+ public $default_value;
+ /**
+ * Is a value required for this property.
+ *
+ * @var boolean
+ */
+ public $is_required;
+ /**
+ * Is this property searchable.
+ *
+ * @var boolean
+ */
+ public $is_searchable;
+ /**
+ * Is this property range searchable.
+ *
+ * @var boolean
+ */
+ public $is_search_range;
+ /**
+ * Controls field display order within an extended property group.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Description and/or help text to display before this field.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Description and/or help text to display after this field.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Optional format instructions for specific field types, like date types.
+ *
+ * @var string
+ */
+ public $mask;
+ /**
+ * Store collection of type-appropriate attributes, e.g. textarea needs rows/cols attributes
+ *
+ * @var string
+ */
+ public $attributes;
+ /**
+ * Optional scripting attributes for field.
+ *
+ * @var string
+ */
+ public $javascript;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this property set by PHP Code? A code field is viewable but not editable
+ *
+ * @var boolean
+ */
+ public $is_view;
+ /**
+ * number of options per line for checkbox and radio
+ *
+ * @var int unsigned
+ */
+ public $options_per_line;
+ /**
+ * field length if alphanumeric
+ *
+ * @var int unsigned
+ */
+ public $text_length;
+ /**
+ * Date may be up to start_date_years years prior to the current date.
+ *
+ * @var int
+ */
+ public $start_date_years;
+ /**
+ * Date may be up to end_date_years years after the current date.
+ *
+ * @var int
+ */
+ public $end_date_years;
+ /**
+ * date format for custom date
+ *
+ * @var string
+ */
+ public $date_format;
+ /**
+ * time format for custom date
+ *
+ * @var int unsigned
+ */
+ public $time_format;
+ /**
+ * Number of columns in Note Field
+ *
+ * @var int unsigned
+ */
+ public $note_columns;
+ /**
+ * Number of rows in Note Field
+ *
+ * @var int unsigned
+ */
+ public $note_rows;
+ /**
+ * Name of the column that holds the values for this field.
+ *
+ * @var string
+ */
+ public $column_name;
+ /**
+ * For elements with options, the option group id that is used
+ *
+ * @var int unsigned
+ */
+ public $option_group_id;
+ /**
+ * Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.
+ *
+ * @var string
+ */
+ public $filter;
+ /**
+ * Should the multi-record custom field values be displayed in tab table listing
+ *
+ * @var boolean
+ */
+ public $in_selector;
+ /**
+ * class constructor
+ *
+ * @return civicrm_custom_field
+ */
+ function __construct() {
+ $this->__table = 'civicrm_custom_field';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'custom_group_id', 'civicrm_custom_group', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Custom Field ID') ,
+ 'description' => 'Unique Custom Field ID',
+ 'required' => true,
+ ) ,
+ 'custom_group_id' => array(
+ 'name' => 'custom_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Custom Group') ,
+ 'description' => 'FK to civicrm_custom_group.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_CustomGroup',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_custom_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Name') ,
+ 'description' => 'Variable name/programmatic handle for this group.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Label') ,
+ 'description' => 'Text for form field label (also friendly name for administering this custom property).',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'data_type' => array(
+ 'name' => 'data_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Data Type') ,
+ 'description' => 'Controls location of data storage in extended_data table.',
+ 'required' => true,
+ 'maxlength' => 16,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_BAO_CustomField::dataType',
+ )
+ ) ,
+ 'html_type' => array(
+ 'name' => 'html_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field HTML Type') ,
+ 'description' => 'HTML types plus several built-in extended types.',
+ 'required' => true,
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::customHtmlType',
+ )
+ ) ,
+ 'default_value' => array(
+ 'name' => 'default_value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Default') ,
+ 'description' => 'Use form_options.is_default for field_types which use options.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_required' => array(
+ 'name' => 'is_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Custom Field Is Required?') ,
+ 'description' => 'Is a value required for this property.',
+ ) ,
+ 'is_searchable' => array(
+ 'name' => 'is_searchable',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Searching on Field?') ,
+ 'description' => 'Is this property searchable.',
+ ) ,
+ 'is_search_range' => array(
+ 'name' => 'is_search_range',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Search as a Range') ,
+ 'description' => 'Is this property range searchable.',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Controls field display order within an extended property group.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Custom Field Pre Text') ,
+ 'description' => 'Description and/or help text to display before this field.',
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Custom Field Post Text') ,
+ 'description' => 'Description and/or help text to display after this field.',
+ ) ,
+ 'mask' => array(
+ 'name' => 'mask',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Formatting') ,
+ 'description' => 'Optional format instructions for specific field types, like date types.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'attributes' => array(
+ 'name' => 'attributes',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Attributes') ,
+ 'description' => 'Store collection of type-appropriate attributes, e.g. textarea needs rows/cols attributes',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'javascript' => array(
+ 'name' => 'javascript',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Field Javascript') ,
+ 'description' => 'Optional scripting attributes for field.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Custom Field Is Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'is_view' => array(
+ 'name' => 'is_view',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Field is Viewable') ,
+ 'description' => 'Is this property set by PHP Code? A code field is viewable but not editable',
+ ) ,
+ 'options_per_line' => array(
+ 'name' => 'options_per_line',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Options Per Line') ,
+ 'description' => 'number of options per line for checkbox and radio',
+ ) ,
+ 'text_length' => array(
+ 'name' => 'text_length',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Length') ,
+ 'description' => 'field length if alphanumeric',
+ ) ,
+ 'start_date_years' => array(
+ 'name' => 'start_date_years',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Start Date') ,
+ 'description' => 'Date may be up to start_date_years years prior to the current date.',
+ ) ,
+ 'end_date_years' => array(
+ 'name' => 'end_date_years',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field End Date') ,
+ 'description' => 'Date may be up to end_date_years years after the current date.',
+ ) ,
+ 'date_format' => array(
+ 'name' => 'date_format',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Field Data Format') ,
+ 'description' => 'date format for custom date',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'time_format' => array(
+ 'name' => 'time_format',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Time Format') ,
+ 'description' => 'time format for custom date',
+ ) ,
+ 'note_columns' => array(
+ 'name' => 'note_columns',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Note Columns') ,
+ 'description' => ' Number of columns in Note Field ',
+ ) ,
+ 'note_rows' => array(
+ 'name' => 'note_rows',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Note Rows') ,
+ 'description' => ' Number of rows in Note Field ',
+ ) ,
+ 'column_name' => array(
+ 'name' => 'column_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Field Column Name') ,
+ 'description' => 'Name of the column that holds the values for this field.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'option_group_id' => array(
+ 'name' => 'option_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Field Option Group') ,
+ 'description' => 'For elements with options, the option group id that is used',
+ ) ,
+ 'filter' => array(
+ 'name' => 'filter',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Field Filter') ,
+ 'description' => 'Stores Contact Get API params contact reference custom fields. May be used for other filters in the future.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'in_selector' => array(
+ 'name' => 'in_selector',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Field Display') ,
+ 'description' => 'Should the multi-record custom field values be displayed in tab table listing',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'custom_group_id' => 'custom_group_id',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'data_type' => 'data_type',
+ 'html_type' => 'html_type',
+ 'default_value' => 'default_value',
+ 'is_required' => 'is_required',
+ 'is_searchable' => 'is_searchable',
+ 'is_search_range' => 'is_search_range',
+ 'weight' => 'weight',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'mask' => 'mask',
+ 'attributes' => 'attributes',
+ 'javascript' => 'javascript',
+ 'is_active' => 'is_active',
+ 'is_view' => 'is_view',
+ 'options_per_line' => 'options_per_line',
+ 'text_length' => 'text_length',
+ 'start_date_years' => 'start_date_years',
+ 'end_date_years' => 'end_date_years',
+ 'date_format' => 'date_format',
+ 'time_format' => 'time_format',
+ 'note_columns' => 'note_columns',
+ 'note_rows' => 'note_rows',
+ 'column_name' => 'column_name',
+ 'option_group_id' => 'option_group_id',
+ 'filter' => 'filter',
+ 'in_selector' => 'in_selector',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['custom_field'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['custom_field'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/CustomGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:38506cd6eee08189ceae6520952a0a48)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_CustomGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_custom_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Custom Group ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Variable name/programmatic handle for this group.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Friendly Name.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Type of object this group extends (can add other options later e.g. contact_address, etc.).
+ *
+ * @var string
+ */
+ public $extends;
+ /**
+ * FK to civicrm_option_value.id (for option group custom_data_type.)
+ *
+ * @var int unsigned
+ */
+ public $extends_entity_column_id;
+ /**
+ * linking custom group for dynamic object
+ *
+ * @var string
+ */
+ public $extends_entity_column_value;
+ /**
+ * Visual relationship between this form and its parent.
+ *
+ * @var string
+ */
+ public $style;
+ /**
+ * Will this group be in collapsed or expanded mode on initial display ?
+ *
+ * @var int unsigned
+ */
+ public $collapse_display;
+ /**
+ * Description and/or help text to display before fields in form.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Description and/or help text to display after fields in form.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Controls display order when multiple extended property groups are setup for the same class.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Name of the table that holds the values for this group.
+ *
+ * @var string
+ */
+ public $table_name;
+ /**
+ * Does this group hold multiple values?
+ *
+ * @var boolean
+ */
+ public $is_multiple;
+ /**
+ * minimum number of multiple records (typically 0?)
+ *
+ * @var int unsigned
+ */
+ public $min_multiple;
+ /**
+ * maximum number of multiple records, if 0 - no max
+ *
+ * @var int unsigned
+ */
+ public $max_multiple;
+ /**
+ * Will this group be in collapsed or expanded mode on advanced search display ?
+ *
+ * @var int unsigned
+ */
+ public $collapse_adv_display;
+ /**
+ * FK to civicrm_contact, who created this custom group
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time this custom group was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * Is this a reserved Custom Group?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_custom_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_custom_group';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Custom Group ID') ,
+ 'description' => 'Unique Custom Group ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Group Name') ,
+ 'description' => 'Variable name/programmatic handle for this group.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Group Title') ,
+ 'description' => 'Friendly Name.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'extends' => array(
+ 'name' => 'extends',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Group Extends') ,
+ 'description' => 'Type of object this group extends (can add other options later e.g. contact_address, etc.).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'Contact',
+ ) ,
+ 'extends_entity_column_id' => array(
+ 'name' => 'extends_entity_column_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Custom Group Subtype List') ,
+ 'description' => 'FK to civicrm_option_value.id (for option group custom_data_type.)',
+ 'default' => 'NULL',
+ ) ,
+ 'extends_entity_column_value' => array(
+ 'name' => 'extends_entity_column_value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Group Subtype') ,
+ 'description' => 'linking custom group for dynamic object',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'style' => array(
+ 'name' => 'style',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Custom Group Style') ,
+ 'description' => 'Visual relationship between this form and its parent.',
+ 'maxlength' => 15,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::customGroupStyle',
+ )
+ ) ,
+ 'collapse_display' => array(
+ 'name' => 'collapse_display',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Collapse Custom Group?') ,
+ 'description' => 'Will this group be in collapsed or expanded mode on initial display ?',
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Custom Group Pre Text') ,
+ 'description' => 'Description and/or help text to display before fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Custom Group Post Text') ,
+ 'description' => 'Description and/or help text to display after fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Controls display order when multiple extended property groups are setup for the same class.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Custom Group Is Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'table_name' => array(
+ 'name' => 'table_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Table Name') ,
+ 'description' => 'Name of the table that holds the values for this group.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_multiple' => array(
+ 'name' => 'is_multiple',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Supports Multiple Records') ,
+ 'description' => 'Does this group hold multiple values?',
+ ) ,
+ 'min_multiple' => array(
+ 'name' => 'min_multiple',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Minimum Multiple Records') ,
+ 'description' => 'minimum number of multiple records (typically 0?)',
+ ) ,
+ 'max_multiple' => array(
+ 'name' => 'max_multiple',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum Multiple Records') ,
+ 'description' => 'maximum number of multiple records, if 0 - no max',
+ ) ,
+ 'collapse_adv_display' => array(
+ 'name' => 'collapse_adv_display',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Collapse Group Display') ,
+ 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Custom Group Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this custom group',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Custom Group Created Date') ,
+ 'description' => 'Date and time this custom group was created.',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Reserved Group?') ,
+ 'description' => 'Is this a reserved Custom Group?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'extends' => 'extends',
+ 'extends_entity_column_id' => 'extends_entity_column_id',
+ 'extends_entity_column_value' => 'extends_entity_column_value',
+ 'style' => 'style',
+ 'collapse_display' => 'collapse_display',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'weight' => 'weight',
+ 'is_active' => 'is_active',
+ 'table_name' => 'table_name',
+ 'is_multiple' => 'is_multiple',
+ 'min_multiple' => 'min_multiple',
+ 'max_multiple' => 'max_multiple',
+ 'collapse_adv_display' => 'collapse_adv_display',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['custom_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['custom_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Dashboard.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:34427b4a208283a8b74064cabba214a6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Dashboard extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_dashboard';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Domain for dashboard
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Internal name of dashlet.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * dashlet title
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * url in case of external dashlet
+ *
+ * @var string
+ */
+ public $url;
+ /**
+ * Permission for the dashlet
+ *
+ * @var string
+ */
+ public $permission;
+ /**
+ * Permission Operator
+ *
+ * @var string
+ */
+ public $permission_operator;
+ /**
+ * column no for this dashlet
+ *
+ * @var boolean
+ */
+ public $column_no;
+ /**
+ * Is Minimized?
+ *
+ * @var boolean
+ */
+ public $is_minimized;
+ /**
+ * fullscreen url for dashlet
+ *
+ * @var string
+ */
+ public $fullscreen_url;
+ /**
+ * Is Fullscreen?
+ *
+ * @var boolean
+ */
+ public $is_fullscreen;
+ /**
+ * Is this dashlet active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this dashlet reserved?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Ordering of the dashlets.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * class constructor
+ *
+ * @return civicrm_dashboard
+ */
+ function __construct() {
+ $this->__table = 'civicrm_dashboard';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('DashletID') ,
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dashlet Domain') ,
+ 'description' => 'Domain for dashboard',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Dashlet Name') ,
+ 'description' => 'Internal name of dashlet.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Dashlet Title') ,
+ 'description' => 'dashlet title',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url' => array(
+ 'name' => 'url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Dashlet URL') ,
+ 'description' => 'url in case of external dashlet',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'permission' => array(
+ 'name' => 'permission',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Dashlet Permission') ,
+ 'description' => 'Permission for the dashlet',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'permission_operator' => array(
+ 'name' => 'permission_operator',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Dashlet Permission Operator') ,
+ 'description' => 'Permission Operator',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'column_no' => array(
+ 'name' => 'column_no',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Dashlet Column') ,
+ 'description' => 'column no for this dashlet',
+ ) ,
+ 'is_minimized' => array(
+ 'name' => 'is_minimized',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Minimize Dashlet?') ,
+ 'description' => 'Is Minimized?',
+ ) ,
+ 'fullscreen_url' => array(
+ 'name' => 'fullscreen_url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Fullscreen URL') ,
+ 'description' => 'fullscreen url for dashlet',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_fullscreen' => array(
+ 'name' => 'is_fullscreen',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Fullscreen?') ,
+ 'description' => 'Is Fullscreen?',
+ 'default' => '1',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Dashlet Active?') ,
+ 'description' => 'Is this dashlet active?',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Dashlet Reserved?') ,
+ 'description' => 'Is this dashlet reserved?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Ordering of the dashlets.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'url' => 'url',
+ 'permission' => 'permission',
+ 'permission_operator' => 'permission_operator',
+ 'column_no' => 'column_no',
+ 'is_minimized' => 'is_minimized',
+ 'fullscreen_url' => 'fullscreen_url',
+ 'is_fullscreen' => 'is_fullscreen',
+ 'is_active' => 'is_active',
+ 'is_reserved' => 'is_reserved',
+ 'weight' => 'weight',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['dashboard'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['dashboard'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Discount.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:75da068eb56baec87fde8928832ecc49)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Discount extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_discount';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to discount, e.g. civicrm_event
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to civicrm_price_set
+ *
+ * @var int unsigned
+ */
+ public $price_set_id;
+ /**
+ * Date when discount starts.
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * Date when discount ends.
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_discount
+ */
+ function __construct() {
+ $this->__table = 'civicrm_discount';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_set_id', 'civicrm_price_set', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Discount ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'participant_discount_name' => array(
+ 'name' => 'price_set_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Discount Name') ,
+ 'description' => 'FK to civicrm_price_set',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_discount.price_set_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Price_DAO_PriceSet',
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Discount Start Date') ,
+ 'description' => 'Date when discount starts.',
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Discount End Date') ,
+ 'description' => 'Date when discount ends.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'price_set_id' => 'participant_discount_name',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['discount'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['discount'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Domain.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:afa6c9619ebd7c89875504cab8c601ef)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Domain extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_domain';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Domain ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of Domain / Organization
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of Domain.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Backend configuration.
+ *
+ * @var text
+ */
+ public $config_backend;
+ /**
+ * The civicrm version this instance is running
+ *
+ * @var string
+ */
+ public $version;
+ /**
+ * FK to Contact ID. This is specifically not an FK to avoid circular constraints
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * list of locales supported by the current db state (NULL for single-lang install)
+ *
+ * @var text
+ */
+ public $locales;
+ /**
+ * Locale specific string overrides
+ *
+ * @var text
+ */
+ public $locale_custom_strings;
+ /**
+ * class constructor
+ *
+ * @return civicrm_domain
+ */
+ function __construct() {
+ $this->__table = 'civicrm_domain';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Domain ID') ,
+ 'description' => 'Domain ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Domain Name') ,
+ 'description' => 'Name of Domain / Organization',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Domain Description') ,
+ 'description' => 'Description of Domain.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'config_backend' => array(
+ 'name' => 'config_backend',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Domain Configuration') ,
+ 'description' => 'Backend configuration.',
+ 'rows' => 20,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'version' => array(
+ 'name' => 'version',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('CiviCRM Version') ,
+ 'description' => 'The civicrm version this instance is running',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Domain Contact') ,
+ 'description' => 'FK to Contact ID. This is specifically not an FK to avoid circular constraints',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'locales' => array(
+ 'name' => 'locales',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Supported Languages') ,
+ 'description' => 'list of locales supported by the current db state (NULL for single-lang install)',
+ ) ,
+ 'locale_custom_strings' => array(
+ 'name' => 'locale_custom_strings',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Language Customizations') ,
+ 'description' => 'Locale specific string overrides',
+ 'rows' => 20,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'config_backend' => 'config_backend',
+ 'version' => 'version',
+ 'contact_id' => 'contact_id',
+ 'locales' => 'locales',
+ 'locale_custom_strings' => 'locale_custom_strings',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['domain'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['domain'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Email.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2dc794da457f8b47e5f981ec65fac8e7)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Email extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_email';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Email ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Which Location does this email belong to.
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * Email address
+ *
+ * @var string
+ */
+ public $email;
+ /**
+ * Is this the primary?
+ *
+ * @var boolean
+ */
+ public $is_primary;
+ /**
+ * Is this the billing?
+ *
+ * @var boolean
+ */
+ public $is_billing;
+ /**
+ * Is this address on bounce hold?
+ *
+ * @var boolean
+ */
+ public $on_hold;
+ /**
+ * Is this address for bulk mail ?
+ *
+ * @var boolean
+ */
+ public $is_bulkmail;
+ /**
+ * When the address went on bounce hold
+ *
+ * @var datetime
+ */
+ public $hold_date;
+ /**
+ * When the address bounce status was last reset
+ *
+ * @var datetime
+ */
+ public $reset_date;
+ /**
+ * Text formatted signature for the email.
+ *
+ * @var text
+ */
+ public $signature_text;
+ /**
+ * HTML formatted signature for the email.
+ *
+ * @var text
+ */
+ public $signature_html;
+ /**
+ * class constructor
+ *
+ * @return civicrm_email
+ */
+ function __construct() {
+ $this->__table = 'civicrm_email';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email ID') ,
+ 'description' => 'Unique Email ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email Contact') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email Location Type') ,
+ 'description' => 'Which Location does this email belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_location_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'display_name',
+ )
+ ) ,
+ 'email' => array(
+ 'name' => 'email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Email') ,
+ 'description' => 'Email address',
+ 'maxlength' => 254,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_email.email',
+ 'headerPattern' => '/e.?mail/i',
+ 'dataPattern' => '/^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/',
+ 'export' => true,
+ 'rule' => 'email',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_primary' => array(
+ 'name' => 'is_primary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Primary email') ,
+ 'description' => 'Is this the primary?',
+ ) ,
+ 'is_billing' => array(
+ 'name' => 'is_billing',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Billing Email?') ,
+ 'description' => 'Is this the billing?',
+ ) ,
+ 'on_hold' => array(
+ 'name' => 'on_hold',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('On Hold') ,
+ 'description' => 'Is this address on bounce hold?',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_email.on_hold',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_bulkmail' => array(
+ 'name' => 'is_bulkmail',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Use for Bulk Mail') ,
+ 'description' => 'Is this address for bulk mail ?',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_email.is_bulkmail',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'hold_date' => array(
+ 'name' => 'hold_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Hold Date') ,
+ 'description' => 'When the address went on bounce hold',
+ ) ,
+ 'reset_date' => array(
+ 'name' => 'reset_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Reset Date') ,
+ 'description' => 'When the address bounce status was last reset',
+ ) ,
+ 'signature_text' => array(
+ 'name' => 'signature_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Signature Text') ,
+ 'description' => 'Text formatted signature for the email.',
+ 'import' => true,
+ 'where' => 'civicrm_email.signature_text',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ ) ,
+ 'signature_html' => array(
+ 'name' => 'signature_html',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Signature Html') ,
+ 'description' => 'HTML formatted signature for the email.',
+ 'import' => true,
+ 'where' => 'civicrm_email.signature_html',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'location_type_id' => 'location_type_id',
+ 'email' => 'email',
+ 'is_primary' => 'is_primary',
+ 'is_billing' => 'is_billing',
+ 'on_hold' => 'on_hold',
+ 'is_bulkmail' => 'is_bulkmail',
+ 'hold_date' => 'hold_date',
+ 'reset_date' => 'reset_date',
+ 'signature_text' => 'signature_text',
+ 'signature_html' => 'signature_html',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['email'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['email'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/EntityFile.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:76017bafd716db9f4985c7efb8183cfd)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_EntityFile extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_entity_file';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to file, e.g. civicrm_contact
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to civicrm_file
+ *
+ * @var int unsigned
+ */
+ public $file_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_entity_file
+ */
+ function __construct() {
+ $this->__table = 'civicrm_entity_file';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'file_id', 'civicrm_file', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity File ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'physical tablename for entity being joined to file, e.g. civicrm_contact',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'file_id' => array(
+ 'name' => 'file_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('File') ,
+ 'description' => 'FK to civicrm_file',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_File',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'file_id' => 'file_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['entity_file'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['entity_file'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/EntityTag.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:967442bce6e54fe4ca4fdcb91f580cef)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_EntityTag extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_entity_tag';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to file, e.g. civicrm_contact
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to civicrm_tag
+ *
+ * @var int unsigned
+ */
+ public $tag_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_entity_tag
+ */
+ function __construct() {
+ $this->__table = 'civicrm_entity_tag';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'tag_id', 'civicrm_tag', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity Tag ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'physical tablename for entity being joined to file, e.g. civicrm_contact',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'tag_used_for',
+ 'optionEditPath' => 'civicrm/admin/options/tag_used_for',
+ )
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'tag_id' => array(
+ 'name' => 'tag_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Tag') ,
+ 'description' => 'FK to civicrm_tag',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Tag',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_tag',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'tag_id' => 'tag_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['entity_tag'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['entity_tag'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Extension.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3fc8ca00fcd2e22a0087506f09507073)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Extension extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_extension';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Local Extension ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ *
+ * @var string
+ */
+ public $type;
+ /**
+ * Fully qualified extension name
+ *
+ * @var string
+ */
+ public $full_name;
+ /**
+ * Short name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Short, printable name
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * Primary PHP file
+ *
+ * @var string
+ */
+ public $file;
+ /**
+ * Revision code of the database schema; the format is module-defined
+ *
+ * @var string
+ */
+ public $schema_version;
+ /**
+ * Is this extension active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_extension
+ */
+ function __construct() {
+ $this->__table = 'civicrm_extension';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Extension ID') ,
+ 'description' => 'Local Extension ID',
+ 'required' => true,
+ ) ,
+ 'type' => array(
+ 'name' => 'type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Type') ,
+ 'required' => true,
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getExtensionTypes',
+ )
+ ) ,
+ 'full_name' => array(
+ 'name' => 'full_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Key') ,
+ 'description' => 'Fully qualified extension name',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Short name',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_extension.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label') ,
+ 'description' => 'Short, printable name',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_extension.label',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'file' => array(
+ 'name' => 'file',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('File') ,
+ 'description' => 'Primary PHP file',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_extension.file',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'schema_version' => array(
+ 'name' => 'schema_version',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Schema Version') ,
+ 'description' => 'Revision code of the database schema; the format is module-defined',
+ 'maxlength' => 63,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_extension.schema_version',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Extension is Active?') ,
+ 'description' => 'Is this extension active?',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'type' => 'type',
+ 'full_name' => 'full_name',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'file' => 'file',
+ 'schema_version' => 'schema_version',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['extension'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['extension'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/File.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:175852e7e39c740ce903ccc56da20388)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_File extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_file';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $file_type_id;
+ /**
+ * mime type of the document
+ *
+ * @var string
+ */
+ public $mime_type;
+ /**
+ * uri of the file on disk
+ *
+ * @var string
+ */
+ public $uri;
+ /**
+ * contents of the document
+ *
+ * @var mediumblob
+ */
+ public $document;
+ /**
+ * Additional descriptive text regarding this attachment (optional).
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Date and time that this attachment was uploaded or written to server.
+ *
+ * @var datetime
+ */
+ public $upload_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_file
+ */
+ function __construct() {
+ $this->__table = 'civicrm_file';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('File ID') ,
+ 'description' => 'Unique ID',
+ 'required' => true,
+ ) ,
+ 'file_type_id' => array(
+ 'name' => 'file_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('File Type') ,
+ 'description' => 'Type of file (e.g. Transcript, Income Tax Return, etc). FK to civicrm_option_value.',
+ ) ,
+ 'mime_type' => array(
+ 'name' => 'mime_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mime Type') ,
+ 'description' => 'mime type of the document',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'uri' => array(
+ 'name' => 'uri',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Path') ,
+ 'description' => 'uri of the file on disk',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'document' => array(
+ 'name' => 'document',
+ 'type' => CRM_Utils_Type::T_MEDIUMBLOB,
+ 'title' => ts('File Contents') ,
+ 'description' => 'contents of the document',
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('File Description') ,
+ 'description' => 'Additional descriptive text regarding this attachment (optional).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'upload_date' => array(
+ 'name' => 'upload_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('File Upload Date') ,
+ 'description' => 'Date and time that this attachment was uploaded or written to server.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'file_type_id' => 'file_type_id',
+ 'mime_type' => 'mime_type',
+ 'uri' => 'uri',
+ 'document' => 'document',
+ 'description' => 'description',
+ 'upload_date' => 'upload_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['file'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['file'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/IM.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:1f7e266130e31dbdaf5e2021c5ba09ea)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_IM extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_im';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique IM ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Which Location does this email belong to.
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * IM screen name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Which IM Provider does this screen name belong to.
+ *
+ * @var int unsigned
+ */
+ public $provider_id;
+ /**
+ * Is this the primary IM for this contact and location.
+ *
+ * @var boolean
+ */
+ public $is_primary;
+ /**
+ * Is this the billing?
+ *
+ * @var boolean
+ */
+ public $is_billing;
+ /**
+ * class constructor
+ *
+ * @return civicrm_im
+ */
+ function __construct() {
+ $this->__table = 'civicrm_im';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Instant Messenger ID') ,
+ 'description' => 'Unique IM ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('IM Contact') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('IM Location Type') ,
+ 'description' => 'Which Location does this email belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_location_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'display_name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('IM Screen Name') ,
+ 'description' => 'IM screen name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_im.name',
+ 'headerPattern' => '/I(nstant )?M(ess.*)?|screen(\s+)?name/i',
+ 'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'provider_id' => array(
+ 'name' => 'provider_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('IM Provider') ,
+ 'description' => 'Which IM Provider does this screen name belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'instant_messenger_service',
+ 'optionEditPath' => 'civicrm/admin/options/instant_messenger_service',
+ )
+ ) ,
+ 'is_primary' => array(
+ 'name' => 'is_primary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is IM Primary?') ,
+ 'description' => 'Is this the primary IM for this contact and location.',
+ ) ,
+ 'is_billing' => array(
+ 'name' => 'is_billing',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is IM Billing?') ,
+ 'description' => 'Is this the billing?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'location_type_id' => 'location_type_id',
+ 'name' => 'name',
+ 'provider_id' => 'provider_id',
+ 'is_primary' => 'is_primary',
+ 'is_billing' => 'is_billing',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['im'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['im'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Job.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:d8f718bddca376de7c6e3fd9b3c13070)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Job extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_job';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Job Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this scheduled job for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Scheduled job run frequency.
+ *
+ * @var string
+ */
+ public $run_frequency;
+ /**
+ * When was this cron entry last run
+ *
+ * @var datetime
+ */
+ public $last_run;
+ /**
+ * When is this cron entry scheduled to run
+ *
+ * @var timestamp
+ */
+ public $scheduled_run_date;
+ /**
+ * Title of the job
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of the job
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Entity of the job api call
+ *
+ * @var string
+ */
+ public $api_entity;
+ /**
+ * Action of the job api call
+ *
+ * @var string
+ */
+ public $api_action;
+ /**
+ * List of parameters to the command.
+ *
+ * @var text
+ */
+ public $parameters;
+ /**
+ * Is this job active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_job
+ */
+ function __construct() {
+ $this->__table = 'civicrm_job';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Job ID') ,
+ 'description' => 'Job Id',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Job Domain') ,
+ 'description' => 'Which Domain is this scheduled job for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'run_frequency' => array(
+ 'name' => 'run_frequency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Job Frequency') ,
+ 'description' => 'Scheduled job run frequency.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'Daily',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getJobFrequency',
+ )
+ ) ,
+ 'last_run' => array(
+ 'name' => 'last_run',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Last Run') ,
+ 'description' => 'When was this cron entry last run',
+ 'default' => 'NULL',
+ ) ,
+ 'scheduled_run_date' => array(
+ 'name' => 'scheduled_run_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Scheduled Run Date') ,
+ 'description' => 'When is this cron entry scheduled to run',
+ 'required' => false,
+ 'default' => 'NULL',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Job Name') ,
+ 'description' => 'Title of the job',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Job Description') ,
+ 'description' => 'Description of the job',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'api_entity' => array(
+ 'name' => 'api_entity',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('API Entity') ,
+ 'description' => 'Entity of the job api call',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'api_action' => array(
+ 'name' => 'api_action',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('API Action') ,
+ 'description' => 'Action of the job api call',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'parameters' => array(
+ 'name' => 'parameters',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('API Parameters') ,
+ 'description' => 'List of parameters to the command.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Job Is Active?') ,
+ 'description' => 'Is this job active?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'run_frequency' => 'run_frequency',
+ 'last_run' => 'last_run',
+ 'scheduled_run_date' => 'scheduled_run_date',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'api_entity' => 'api_entity',
+ 'api_action' => 'api_action',
+ 'parameters' => 'parameters',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['job'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['job'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/JobLog.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b3db255c249f77b4c75694be17dd4191)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_JobLog extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_job_log';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Job log entry Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this scheduled job for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Log entry date
+ *
+ * @var timestamp
+ */
+ public $run_time;
+ /**
+ * Pointer to job id - not a FK though, just for logging purposes
+ *
+ * @var int unsigned
+ */
+ public $job_id;
+ /**
+ * Title of the job
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Full path to file containing job script
+ *
+ * @var string
+ */
+ public $command;
+ /**
+ * Title line of log entry
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Potential extended data for specific job run (e.g. tracebacks).
+ *
+ * @var text
+ */
+ public $data;
+ /**
+ * class constructor
+ *
+ * @return civicrm_job_log
+ */
+ function __construct() {
+ $this->__table = 'civicrm_job_log';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Job Log ID') ,
+ 'description' => 'Job log entry Id',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Domain ID') ,
+ 'description' => 'Which Domain is this scheduled job for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'run_time' => array(
+ 'name' => 'run_time',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'Log entry date',
+ ) ,
+ 'job_id' => array(
+ 'name' => 'job_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Job ID') ,
+ 'description' => 'Pointer to job id - not a FK though, just for logging purposes',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Job Name') ,
+ 'description' => 'Title of the job',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'command' => array(
+ 'name' => 'command',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Command') ,
+ 'description' => 'Full path to file containing job script',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Title line of log entry',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Extended Data') ,
+ 'description' => 'Potential extended data for specific job run (e.g. tracebacks).',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'run_time' => 'run_time',
+ 'job_id' => 'job_id',
+ 'name' => 'name',
+ 'command' => 'command',
+ 'description' => 'description',
+ 'data' => 'data',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['job_log'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['job_log'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/LocBlock.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2a7b1e825f701ffdd3c41e6da8f312c1)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_LocBlock extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_loc_block';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $address_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $email_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $phone_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $im_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $address_2_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $email_2_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $phone_2_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $im_2_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_loc_block
+ */
+ function __construct() {
+ $this->__table = 'civicrm_loc_block';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'address_id', 'civicrm_address', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'email_id', 'civicrm_email', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'phone_id', 'civicrm_phone', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'im_id', 'civicrm_im', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'address_2_id', 'civicrm_address', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'email_2_id', 'civicrm_email', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'phone_2_id', 'civicrm_phone', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'im_2_id', 'civicrm_im', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block ID') ,
+ 'description' => 'Unique ID',
+ 'required' => true,
+ ) ,
+ 'address_id' => array(
+ 'name' => 'address_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block Address') ,
+ 'FKClassName' => 'CRM_Core_DAO_Address',
+ ) ,
+ 'email_id' => array(
+ 'name' => 'email_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block Email') ,
+ 'FKClassName' => 'CRM_Core_DAO_Email',
+ ) ,
+ 'phone_id' => array(
+ 'name' => 'phone_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block Phone') ,
+ 'FKClassName' => 'CRM_Core_DAO_Phone',
+ ) ,
+ 'im_id' => array(
+ 'name' => 'im_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block IM') ,
+ 'FKClassName' => 'CRM_Core_DAO_IM',
+ ) ,
+ 'address_2_id' => array(
+ 'name' => 'address_2_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block IM 2') ,
+ 'FKClassName' => 'CRM_Core_DAO_Address',
+ ) ,
+ 'email_2_id' => array(
+ 'name' => 'email_2_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email 2') ,
+ 'FKClassName' => 'CRM_Core_DAO_Email',
+ ) ,
+ 'phone_2_id' => array(
+ 'name' => 'phone_2_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone 2') ,
+ 'FKClassName' => 'CRM_Core_DAO_Phone',
+ ) ,
+ 'im_2_id' => array(
+ 'name' => 'im_2_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Instant Messenger 2') ,
+ 'FKClassName' => 'CRM_Core_DAO_IM',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'address_id' => 'address_id',
+ 'email_id' => 'email_id',
+ 'phone_id' => 'phone_id',
+ 'im_id' => 'im_id',
+ 'address_2_id' => 'address_2_id',
+ 'email_2_id' => 'email_2_id',
+ 'phone_2_id' => 'phone_2_id',
+ 'im_2_id' => 'im_2_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['loc_block'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['loc_block'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/LocationType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b3611cf092b85908a9f3133c667c2862)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_LocationType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_location_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Location Type ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Location Type Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Location Type Display Name.
+ *
+ * @var string
+ */
+ public $display_name;
+ /**
+ * vCard Location Type Name.
+ *
+ * @var string
+ */
+ public $vcard_name;
+ /**
+ * Location Type Description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Is this location type a predefined system location?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this location type the default?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * class constructor
+ *
+ * @return civicrm_location_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_location_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Type ID') ,
+ 'description' => 'Location Type ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Location Type') ,
+ 'description' => 'Location Type Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'display_name' => array(
+ 'name' => 'display_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Display Name') ,
+ 'description' => 'Location Type Display Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'vcard_name' => array(
+ 'name' => 'vcard_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('vCard Location Type') ,
+ 'description' => 'vCard Location Type Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Location Type Description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Location Type is Reserved?') ,
+ 'description' => 'Is this location type a predefined system location?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Location Type is Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Default Location Type?') ,
+ 'description' => 'Is this location type the default?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'display_name' => 'display_name',
+ 'vcard_name' => 'vcard_name',
+ 'description' => 'description',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ 'is_default' => 'is_default',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['location_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['location_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Log.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7960dedfa838bdfb99b0a0c1a55c6c06)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Log extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_log';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Log ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of table where item being referenced is stored.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Updates does to this object if any.
+ *
+ * @var text
+ */
+ public $data;
+ /**
+ * FK to Contact ID of person under whose credentials this data modification was made.
+ *
+ * @var int unsigned
+ */
+ public $modified_id;
+ /**
+ * When was the referenced entity created or modified or deleted.
+ *
+ * @var datetime
+ */
+ public $modified_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_log
+ */
+ function __construct() {
+ $this->__table = 'civicrm_log';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'modified_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Log ID') ,
+ 'description' => 'Log ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Name of table where item being referenced is stored.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID ') ,
+ 'description' => 'Foreign key to the referenced item.',
+ 'required' => true,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Data') ,
+ 'description' => 'Updates does to this object if any.',
+ ) ,
+ 'modified_id' => array(
+ 'name' => 'modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Modified By') ,
+ 'description' => 'FK to Contact ID of person under whose credentials this data modification was made.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Modified Date') ,
+ 'description' => 'When was the referenced entity created or modified or deleted.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'data' => 'data',
+ 'modified_id' => 'modified_id',
+ 'modified_date' => 'modified_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['log'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['log'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/MailSettings.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0707df8b7612f3aec6bd0d98fccb8464)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_MailSettings extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mail_settings';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * primary key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this match entry for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * name of this group of settings
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * whether this is the default set of settings for this domain
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * email address domain (the part after @)
+ *
+ * @var string
+ */
+ public $domain;
+ /**
+ * optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)
+ *
+ * @var string
+ */
+ public $localpart;
+ /**
+ * contents of the Return-Path header
+ *
+ * @var string
+ */
+ public $return_path;
+ /**
+ * name of the protocol to use for polling (like IMAP, POP3 or Maildir)
+ *
+ * @var string
+ */
+ public $protocol;
+ /**
+ * server to use when polling
+ *
+ * @var string
+ */
+ public $server;
+ /**
+ * port to use when polling
+ *
+ * @var int unsigned
+ */
+ public $port;
+ /**
+ * username to use when polling
+ *
+ * @var string
+ */
+ public $username;
+ /**
+ * password to use when polling
+ *
+ * @var string
+ */
+ public $password;
+ /**
+ * whether to use SSL or not
+ *
+ * @var boolean
+ */
+ public $is_ssl;
+ /**
+ * folder to poll from when using IMAP, path to poll from when using Maildir, etc.
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mail_settings
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mail_settings';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mail Settings ID') ,
+ 'description' => 'primary key',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mail Settings Domain') ,
+ 'description' => 'Which Domain is this match entry for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mail Settings Name') ,
+ 'description' => 'name of this group of settings',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Default Mail Settings?') ,
+ 'description' => 'whether this is the default set of settings for this domain',
+ ) ,
+ 'domain' => array(
+ 'name' => 'domain',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('email Domain') ,
+ 'description' => 'email address domain (the part after @)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'localpart' => array(
+ 'name' => 'localpart',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('email Local Part') ,
+ 'description' => 'optional local part (like civimail+ for addresses like civimail+s.1.2@example.com)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'return_path' => array(
+ 'name' => 'return_path',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Return Path') ,
+ 'description' => 'contents of the Return-Path header',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'protocol' => array(
+ 'name' => 'protocol',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Protocol') ,
+ 'description' => 'name of the protocol to use for polling (like IMAP, POP3 or Maildir)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'mail_protocol',
+ 'optionEditPath' => 'civicrm/admin/options/mail_protocol',
+ )
+ ) ,
+ 'server' => array(
+ 'name' => 'server',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mail Server') ,
+ 'description' => 'server to use when polling',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'port' => array(
+ 'name' => 'port',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mail Port') ,
+ 'description' => 'port to use when polling',
+ ) ,
+ 'username' => array(
+ 'name' => 'username',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mail Account Username') ,
+ 'description' => 'username to use when polling',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'password' => array(
+ 'name' => 'password',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mail Account Password') ,
+ 'description' => 'password to use when polling',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_ssl' => array(
+ 'name' => 'is_ssl',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Mail Account Uses SSL') ,
+ 'description' => 'whether to use SSL or not',
+ ) ,
+ 'source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mail Folder') ,
+ 'description' => 'folder to poll from when using IMAP, path to poll from when using Maildir, etc.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'name',
+ 'is_default' => 'is_default',
+ 'domain' => 'domain',
+ 'localpart' => 'localpart',
+ 'return_path' => 'return_path',
+ 'protocol' => 'protocol',
+ 'server' => 'server',
+ 'port' => 'port',
+ 'username' => 'username',
+ 'password' => 'password',
+ 'is_ssl' => 'is_ssl',
+ 'source' => 'source',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mail_settings'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mail_settings'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Managed.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2921c71ebc07f80ebe948f283ceed5da)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Managed extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_managed';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Surrogate Key
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the module which declared this object
+ *
+ * @var string
+ */
+ public $module;
+ /**
+ * Symbolic name used by the module to identify the object
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * API entity type
+ *
+ * @var string
+ */
+ public $entity_type;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Policy on when to cleanup entity (always, never, unused)
+ *
+ * @var string
+ */
+ public $cleanup;
+ /**
+ * class constructor
+ *
+ * @return civicrm_managed
+ */
+ function __construct() {
+ $this->__table = 'civicrm_managed';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Managed ID') ,
+ 'description' => 'Surrogate Key',
+ 'required' => true,
+ ) ,
+ 'module' => array(
+ 'name' => 'module',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Module') ,
+ 'description' => 'Name of the module which declared this object',
+ 'required' => true,
+ 'maxlength' => 127,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Symbolic name used by the module to identify the object',
+ 'maxlength' => 127,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'entity_type' => array(
+ 'name' => 'entity_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Type') ,
+ 'description' => 'API entity type',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'Foreign key to the referenced item.',
+ 'required' => true,
+ ) ,
+ 'cleanup' => array(
+ 'name' => 'cleanup',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Cleanup Setting') ,
+ 'description' => 'Policy on when to cleanup entity (always, never, unused)',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_ManagedEntities::getCleanupOptions',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'module' => 'module',
+ 'name' => 'name',
+ 'entity_type' => 'entity_type',
+ 'entity_id' => 'entity_id',
+ 'cleanup' => 'cleanup',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['managed'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['managed'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Mapping.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:e2cbe03713267fb3e323225059ee8257)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Mapping extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mapping';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Mapping ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of Mapping
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of Mapping.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Mapping Type
+ *
+ * @var int unsigned
+ */
+ public $mapping_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mapping
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mapping';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mapping ID') ,
+ 'description' => 'Mapping ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Name of Mapping',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Description of Mapping.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'mapping_type_id' => array(
+ 'name' => 'mapping_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mapping Type') ,
+ 'description' => 'Mapping Type',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'mapping_type',
+ 'optionEditPath' => 'civicrm/admin/options/mapping_type',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'mapping_type_id' => 'mapping_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mapping'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mapping'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/MappingField.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3d48f11ca4d7d7bfbfa9125745b0f3e1)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_MappingField extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mapping_field';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Mapping Field ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Mapping to which this field belongs
+ *
+ * @var int unsigned
+ */
+ public $mapping_id;
+ /**
+ * Mapping field key
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Contact Type in mapping
+ *
+ * @var string
+ */
+ public $contact_type;
+ /**
+ * Column number for mapping set
+ *
+ * @var int unsigned
+ */
+ public $column_number;
+ /**
+ * Location type of this mapping, if required
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * Which type of phone does this number belongs.
+ *
+ * @var int unsigned
+ */
+ public $phone_type_id;
+ /**
+ * Which type of IM Provider does this name belong.
+ *
+ * @var int unsigned
+ */
+ public $im_provider_id;
+ /**
+ * Which type of website does this site belong
+ *
+ * @var int unsigned
+ */
+ public $website_type_id;
+ /**
+ * Relationship type, if required
+ *
+ * @var int unsigned
+ */
+ public $relationship_type_id;
+ /**
+ *
+ * @var string
+ */
+ public $relationship_direction;
+ /**
+ * Used to group mapping_field records into related sets (e.g. for criteria sets in search builder
+ mappings).
+ *
+ * @var int unsigned
+ */
+ public $grouping;
+ /**
+ * SQL WHERE operator for search-builder mapping fields (search criteria).
+ *
+ * @var string
+ */
+ public $operator;
+ /**
+ * SQL WHERE value for search-builder mapping fields.
+ *
+ * @var string
+ */
+ public $value;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mapping_field
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mapping_field';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mapping_id', 'civicrm_mapping', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'location_type_id', 'civicrm_location_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'relationship_type_id', 'civicrm_relationship_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mapping Field ID') ,
+ 'description' => 'Mapping Field ID',
+ 'required' => true,
+ ) ,
+ 'mapping_id' => array(
+ 'name' => 'mapping_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mapping ID') ,
+ 'description' => 'Mapping to which this field belongs',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Mapping',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Mapping field key',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'contact_type' => array(
+ 'name' => 'contact_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type') ,
+ 'description' => 'Contact Type in mapping',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'column_number' => array(
+ 'name' => 'column_number',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Column Number') ,
+ 'description' => 'Column number for mapping set',
+ 'required' => true,
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location type ID') ,
+ 'description' => 'Location type of this mapping, if required',
+ 'FKClassName' => 'CRM_Core_DAO_LocationType',
+ ) ,
+ 'phone_type_id' => array(
+ 'name' => 'phone_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone type ID') ,
+ 'description' => 'Which type of phone does this number belongs.',
+ ) ,
+ 'im_provider_id' => array(
+ 'name' => 'im_provider_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('IM provider ID') ,
+ 'description' => 'Which type of IM Provider does this name belong.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'instant_messenger_service',
+ 'optionEditPath' => 'civicrm/admin/options/instant_messenger_service',
+ )
+ ) ,
+ 'website_type_id' => array(
+ 'name' => 'website_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Website type ID') ,
+ 'description' => 'Which type of website does this site belong',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'website_type',
+ 'optionEditPath' => 'civicrm/admin/options/website_type',
+ )
+ ) ,
+ 'relationship_type_id' => array(
+ 'name' => 'relationship_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Relationship type ID') ,
+ 'description' => 'Relationship type, if required',
+ 'FKClassName' => 'CRM_Contact_DAO_RelationshipType',
+ ) ,
+ 'relationship_direction' => array(
+ 'name' => 'relationship_direction',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Direction') ,
+ 'maxlength' => 6,
+ 'size' => CRM_Utils_Type::SIX,
+ ) ,
+ 'grouping' => array(
+ 'name' => 'grouping',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Grouping') ,
+ 'description' => 'Used to group mapping_field records into related sets (e.g. for criteria sets in search builder
+ mappings).
+ ',
+ 'default' => '1',
+ ) ,
+ 'operator' => array(
+ 'name' => 'operator',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Operator') ,
+ 'description' => 'SQL WHERE operator for search-builder mapping fields (search criteria).',
+ 'maxlength' => 16,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getSearchBuilderOperators',
+ )
+ ) ,
+ 'value' => array(
+ 'name' => 'value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Value') ,
+ 'description' => 'SQL WHERE value for search-builder mapping fields.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'mapping_id' => 'mapping_id',
+ 'name' => 'name',
+ 'contact_type' => 'contact_type',
+ 'column_number' => 'column_number',
+ 'location_type_id' => 'location_type_id',
+ 'phone_type_id' => 'phone_type_id',
+ 'im_provider_id' => 'im_provider_id',
+ 'website_type_id' => 'website_type_id',
+ 'relationship_type_id' => 'relationship_type_id',
+ 'relationship_direction' => 'relationship_direction',
+ 'grouping' => 'grouping',
+ 'operator' => 'operator',
+ 'value' => 'value',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mapping_field'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mapping_field'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Menu.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:ed98e9568ede4fc7953b53b46a72b8db)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Menu extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_menu';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this menu item for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Path Name
+ *
+ * @var string
+ */
+ public $path;
+ /**
+ * Arguments to pass to the url
+ *
+ * @var text
+ */
+ public $path_arguments;
+ /**
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Function to call to check access permissions
+ *
+ * @var string
+ */
+ public $access_callback;
+ /**
+ * Arguments to pass to access callback
+ *
+ * @var text
+ */
+ public $access_arguments;
+ /**
+ * function to call for this url
+ *
+ * @var string
+ */
+ public $page_callback;
+ /**
+ * Arguments to pass to page callback
+ *
+ * @var text
+ */
+ public $page_arguments;
+ /**
+ * Breadcrumb for the path.
+ *
+ * @var text
+ */
+ public $breadcrumb;
+ /**
+ * Url where a page should redirected to, if next url not known.
+ *
+ * @var string
+ */
+ public $return_url;
+ /**
+ * Arguments to pass to return_url
+ *
+ * @var string
+ */
+ public $return_url_args;
+ /**
+ * Component that this menu item belongs to
+ *
+ * @var int unsigned
+ */
+ public $component_id;
+ /**
+ * Is this menu item active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this menu accessible to the public?
+ *
+ * @var boolean
+ */
+ public $is_public;
+ /**
+ * Is this menu exposed to the navigation system?
+ *
+ * @var boolean
+ */
+ public $is_exposed;
+ /**
+ * Should this menu be exposed via SSL if enabled?
+ *
+ * @var boolean
+ */
+ public $is_ssl;
+ /**
+ * Ordering of the menu items in various blocks.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Drupal menu type.
+ *
+ * @var int
+ */
+ public $type;
+ /**
+ * CiviCRM menu type.
+ *
+ * @var int
+ */
+ public $page_type;
+ /**
+ * skip this url being exposed to breadcrumb
+ *
+ * @var boolean
+ */
+ public $skipBreadcrumb;
+ /**
+ * class constructor
+ *
+ * @return civicrm_menu
+ */
+ function __construct() {
+ $this->__table = 'civicrm_menu';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'component_id', 'civicrm_component', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Menu ID') ,
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Domain') ,
+ 'description' => 'Which Domain is this menu item for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'path' => array(
+ 'name' => 'path',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Path') ,
+ 'description' => 'Path Name',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'path_arguments' => array(
+ 'name' => 'path_arguments',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Arguments') ,
+ 'description' => 'Arguments to pass to the url',
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Menu Title') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'access_callback' => array(
+ 'name' => 'access_callback',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Access Callback') ,
+ 'description' => 'Function to call to check access permissions',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'access_arguments' => array(
+ 'name' => 'access_arguments',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Access Arguments') ,
+ 'description' => 'Arguments to pass to access callback',
+ ) ,
+ 'page_callback' => array(
+ 'name' => 'page_callback',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Page Callback') ,
+ 'description' => 'function to call for this url',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'page_arguments' => array(
+ 'name' => 'page_arguments',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Page Arguments') ,
+ 'description' => 'Arguments to pass to page callback',
+ ) ,
+ 'breadcrumb' => array(
+ 'name' => 'breadcrumb',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Breadcrumb') ,
+ 'description' => 'Breadcrumb for the path.',
+ ) ,
+ 'return_url' => array(
+ 'name' => 'return_url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Return Url') ,
+ 'description' => 'Url where a page should redirected to, if next url not known.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'return_url_args' => array(
+ 'name' => 'return_url_args',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Return Url Args') ,
+ 'description' => 'Arguments to pass to return_url',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'component_id' => array(
+ 'name' => 'component_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Component') ,
+ 'description' => 'Component that this menu item belongs to',
+ 'FKClassName' => 'CRM_Core_DAO_Component',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Enabled?') ,
+ 'description' => 'Is this menu item active?',
+ ) ,
+ 'is_public' => array(
+ 'name' => 'is_public',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Public?') ,
+ 'description' => 'Is this menu accessible to the public?',
+ ) ,
+ 'is_exposed' => array(
+ 'name' => 'is_exposed',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Exposed?') ,
+ 'description' => 'Is this menu exposed to the navigation system?',
+ ) ,
+ 'is_ssl' => array(
+ 'name' => 'is_ssl',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Use SSL?') ,
+ 'description' => 'Should this menu be exposed via SSL if enabled?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Ordering of the menu items in various blocks.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'type' => array(
+ 'name' => 'type',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Type') ,
+ 'description' => 'Drupal menu type.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'page_type' => array(
+ 'name' => 'page_type',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Page Type') ,
+ 'description' => 'CiviCRM menu type.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'skipBreadcrumb' => array(
+ 'name' => 'skipBreadcrumb',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Hide Breadcrumb?') ,
+ 'description' => 'skip this url being exposed to breadcrumb',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'path' => 'path',
+ 'path_arguments' => 'path_arguments',
+ 'title' => 'title',
+ 'access_callback' => 'access_callback',
+ 'access_arguments' => 'access_arguments',
+ 'page_callback' => 'page_callback',
+ 'page_arguments' => 'page_arguments',
+ 'breadcrumb' => 'breadcrumb',
+ 'return_url' => 'return_url',
+ 'return_url_args' => 'return_url_args',
+ 'component_id' => 'component_id',
+ 'is_active' => 'is_active',
+ 'is_public' => 'is_public',
+ 'is_exposed' => 'is_exposed',
+ 'is_ssl' => 'is_ssl',
+ 'weight' => 'weight',
+ 'type' => 'type',
+ 'page_type' => 'page_type',
+ 'skipBreadcrumb' => 'skipBreadcrumb',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['menu'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['menu'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/MessageTemplate.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:523f8ccc143651d5d4ea4adf620f71fa)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_MessageTemplate extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_msg_template';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Message Template ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Descriptive title of message
+ *
+ * @var string
+ */
+ public $msg_title;
+ /**
+ * Subject for email message.
+ *
+ * @var text
+ */
+ public $msg_subject;
+ /**
+ * Text formatted message
+ *
+ * @var longtext
+ */
+ public $msg_text;
+ /**
+ * HTML formatted message
+ *
+ * @var longtext
+ */
+ public $msg_html;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * a pseudo-FK to civicrm_option_value
+ *
+ * @var int unsigned
+ */
+ public $workflow_id;
+ /**
+ * is this the default message template for the workflow referenced by workflow_id?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * is this the reserved message template which we ship for the workflow referenced by workflow_id?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this message template used for sms?
+ *
+ * @var boolean
+ */
+ public $is_sms;
+ /**
+ * a pseudo-FK to civicrm_option_value containing PDF Page Format.
+ *
+ * @var int unsigned
+ */
+ public $pdf_format_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_msg_template
+ */
+ function __construct() {
+ $this->__table = 'civicrm_msg_template';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Message Template ID') ,
+ 'description' => 'Message Template ID',
+ 'required' => true,
+ ) ,
+ 'msg_title' => array(
+ 'name' => 'msg_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Message Template Title') ,
+ 'description' => 'Descriptive title of message',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'msg_subject' => array(
+ 'name' => 'msg_subject',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Message Template Subject') ,
+ 'description' => 'Subject for email message.',
+ ) ,
+ 'msg_text' => array(
+ 'name' => 'msg_text',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Message Template Text') ,
+ 'description' => 'Text formatted message',
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'msg_html' => array(
+ 'name' => 'msg_html',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Message Template HTML') ,
+ 'description' => 'HTML formatted message',
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'default' => '1',
+ ) ,
+ 'workflow_id' => array(
+ 'name' => 'workflow_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Message Template Workflow') ,
+ 'description' => 'a pseudo-FK to civicrm_option_value',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Message Template Is Default?') ,
+ 'description' => 'is this the default message template for the workflow referenced by workflow_id?',
+ 'default' => '1',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Message Template Is Reserved?') ,
+ 'description' => 'is this the reserved message template which we ship for the workflow referenced by workflow_id?',
+ ) ,
+ 'is_sms' => array(
+ 'name' => 'is_sms',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Message Template is used for SMS?') ,
+ 'description' => 'Is this message template used for sms?',
+ ) ,
+ 'pdf_format_id' => array(
+ 'name' => 'pdf_format_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Message Template Format') ,
+ 'description' => 'a pseudo-FK to civicrm_option_value containing PDF Page Format.',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'pdf_format',
+ 'keyColumn' => 'id',
+ 'optionEditPath' => 'civicrm/admin/options/pdf_format',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'msg_title' => 'msg_title',
+ 'msg_subject' => 'msg_subject',
+ 'msg_text' => 'msg_text',
+ 'msg_html' => 'msg_html',
+ 'is_active' => 'is_active',
+ 'workflow_id' => 'workflow_id',
+ 'is_default' => 'is_default',
+ 'is_reserved' => 'is_reserved',
+ 'is_sms' => 'is_sms',
+ 'pdf_format_id' => 'pdf_format_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['msg_template'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['msg_template'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Navigation.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c3b7b590569688ba8156a16364182852)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Navigation extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_navigation';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this navigation item for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Navigation Title
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * Internal Name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * url in case of custom navigation link
+ *
+ * @var string
+ */
+ public $url;
+ /**
+ * Permission for menu item
+ *
+ * @var string
+ */
+ public $permission;
+ /**
+ * Permission Operator
+ *
+ * @var string
+ */
+ public $permission_operator;
+ /**
+ * Parent navigation item, used for grouping
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Is this navigation item active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * If separator needs to be added after this menu item
+ *
+ * @var boolean
+ */
+ public $has_separator;
+ /**
+ * Ordering of the navigation items in various blocks.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * class constructor
+ *
+ * @return civicrm_navigation
+ */
+ function __construct() {
+ $this->__table = 'civicrm_navigation';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_navigation', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Navigation ID') ,
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Navigation Domain') ,
+ 'description' => 'Which Domain is this navigation item for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Navigation Item Label') ,
+ 'description' => 'Navigation Title',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Navigation Item Machine Name') ,
+ 'description' => 'Internal Name',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url' => array(
+ 'name' => 'url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Url') ,
+ 'description' => 'url in case of custom navigation link',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'permission' => array(
+ 'name' => 'permission',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Required Permission') ,
+ 'description' => 'Permission for menu item',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'permission_operator' => array(
+ 'name' => 'permission_operator',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Permission Operator') ,
+ 'description' => 'Permission Operator',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Navigation parent ID') ,
+ 'description' => 'Parent navigation item, used for grouping',
+ 'FKClassName' => 'CRM_Core_DAO_Navigation',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_navigation',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is this navigation item active?',
+ ) ,
+ 'has_separator' => array(
+ 'name' => 'has_separator',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Use separator') ,
+ 'description' => 'If separator needs to be added after this menu item',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Ordering of the navigation items in various blocks.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'label' => 'label',
+ 'name' => 'name',
+ 'url' => 'url',
+ 'permission' => 'permission',
+ 'permission_operator' => 'permission_operator',
+ 'parent_id' => 'parent_id',
+ 'is_active' => 'is_active',
+ 'has_separator' => 'has_separator',
+ 'weight' => 'weight',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['navigation'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['navigation'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Note.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:f3613de0ab425231c562e0f115538c5b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Note extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_note';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Note ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of table where item being referenced is stored.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Note and/or Comment.
+ *
+ * @var text
+ */
+ public $note;
+ /**
+ * FK to Contact ID creator
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * When was this note last modified/edited
+ *
+ * @var date
+ */
+ public $modified_date;
+ /**
+ * subject of note description
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)
+ *
+ * @var string
+ */
+ public $privacy;
+ /**
+ * class constructor
+ *
+ * @return civicrm_note
+ */
+ function __construct() {
+ $this->__table = 'civicrm_note';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Note ID') ,
+ 'description' => 'Note ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Note Entity') ,
+ 'description' => 'Name of table where item being referenced is stored.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_BAO_Note::entityTables',
+ )
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Note Entity ID') ,
+ 'description' => 'Foreign key to the referenced item.',
+ 'required' => true,
+ ) ,
+ 'note' => array(
+ 'name' => 'note',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Note') ,
+ 'description' => 'Note and/or Comment.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'import' => true,
+ 'where' => 'civicrm_note.note',
+ 'headerPattern' => '/Note|Comment/i',
+ 'dataPattern' => '//',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Note Created By') ,
+ 'description' => 'FK to Contact ID creator',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Note Modified By') ,
+ 'description' => 'When was this note last modified/edited',
+ ) ,
+ 'subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Subject') ,
+ 'description' => 'subject of note description',
+ 'maxlength' => 255,
+ 'size' => 60,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'privacy' => array(
+ 'name' => 'privacy',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Privacy') ,
+ 'description' => 'Foreign Key to Note Privacy Level (which is an option value pair and hence an implicit FK)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'note_privacy',
+ 'optionEditPath' => 'civicrm/admin/options/note_privacy',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'note' => 'note',
+ 'contact_id' => 'contact_id',
+ 'modified_date' => 'modified_date',
+ 'subject' => 'subject',
+ 'privacy' => 'privacy',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['note'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['note'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/OpenID.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:65368738f80079a3721b69b02af6c316)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_OpenID extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_openid';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique OpenID ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Which Location does this email belong to.
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM
+ *
+ * @var string
+ */
+ public $openid;
+ /**
+ * Whether or not this user is allowed to login
+ *
+ * @var boolean
+ */
+ public $allowed_to_login;
+ /**
+ * Is this the primary email for this contact and location.
+ *
+ * @var boolean
+ */
+ public $is_primary;
+ /**
+ * class constructor
+ *
+ * @return civicrm_openid
+ */
+ function __construct() {
+ $this->__table = 'civicrm_openid';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Open ID identifier') ,
+ 'description' => 'Unique OpenID ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('OpenID Contact') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('OpenID Location Type') ,
+ 'description' => 'Which Location does this email belong to.',
+ ) ,
+ 'openid' => array(
+ 'name' => 'openid',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('OpenID') ,
+ 'description' => 'the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_openid.openid',
+ 'headerPattern' => '/^Open.?ID|u(niq\w*)?.?ID/i',
+ 'dataPattern' => '/^[\w\/\:\.]+$/',
+ 'export' => true,
+ 'rule' => 'url',
+ ) ,
+ 'allowed_to_login' => array(
+ 'name' => 'allowed_to_login',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allowed to login?') ,
+ 'description' => 'Whether or not this user is allowed to login',
+ 'required' => true,
+ ) ,
+ 'is_primary' => array(
+ 'name' => 'is_primary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is OpenID Primary?') ,
+ 'description' => 'Is this the primary email for this contact and location.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'location_type_id' => 'location_type_id',
+ 'openid' => 'openid',
+ 'allowed_to_login' => 'allowed_to_login',
+ 'is_primary' => 'is_primary',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['openid'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['openid'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/OptionGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3fc50ba774dcb073e5ab1a2e84bf880f)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_OptionGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_option_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Option Group ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Option Group title.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Option group description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Is this a predefined system option group (i.e. it can not be deleted)?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this option group active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * A lock to remove the ability to add new options via the UI.
+ *
+ * @var boolean
+ */
+ public $is_locked;
+ /**
+ * class constructor
+ *
+ * @return civicrm_option_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_option_group';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Group ID') ,
+ 'description' => 'Option Group ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Group Name') ,
+ 'description' => 'Option group name. Used as selection key by class properties which lookup options in civicrm_option_value.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Group title') ,
+ 'description' => 'Option Group title.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Group Description') ,
+ 'description' => 'Option group description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option Group Is Reserved?') ,
+ 'description' => 'Is this a predefined system option group (i.e. it can not be deleted)?',
+ 'default' => '1',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option Group Is Active?') ,
+ 'description' => 'Is this option group active?',
+ ) ,
+ 'is_locked' => array(
+ 'name' => 'is_locked',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option Group Is Locked') ,
+ 'description' => 'A lock to remove the ability to add new options via the UI.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ 'is_locked' => 'is_locked',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['option_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['option_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/OptionValue.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:e3ea14ca20323b98bff16b8ea1407425)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_OptionValue extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_option_value';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Option ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Group which this option belongs to.
+ *
+ * @var int unsigned
+ */
+ public $option_group_id;
+ /**
+ * Option string as displayed to users - e.g. the label in an HTML OPTION tag.
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.
+ *
+ * @var string
+ */
+ public $value;
+ /**
+ * Stores a fixed (non-translated) name for this option value. Lookup functions should use the name as the key for the option value row.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.
+ *
+ * @var string
+ */
+ public $grouping;
+ /**
+ * Bitwise logic can be used to create subsets of options within an option_group for different uses.
+ *
+ * @var int unsigned
+ */
+ public $filter;
+ /**
+ * Is this the default option for the group?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Controls display sort order.
+ *
+ * @var int unsigned
+ */
+ public $weight;
+ /**
+ * Optional description.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?
+ *
+ * @var boolean
+ */
+ public $is_optgroup;
+ /**
+ * Is this a predefined system object?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this option active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Component that this option value belongs/caters to.
+ *
+ * @var int unsigned
+ */
+ public $component_id;
+ /**
+ * Which Domain is this option value for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $visibility_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_option_value
+ */
+ function __construct() {
+ $this->__table = 'civicrm_option_value';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'option_group_id', 'civicrm_option_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'component_id', 'civicrm_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Value ID') ,
+ 'description' => 'Option ID',
+ 'required' => true,
+ ) ,
+ 'option_group_id' => array(
+ 'name' => 'option_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Group ID') ,
+ 'description' => 'Group which this option belongs to.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_OptionGroup',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_option_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Label') ,
+ 'description' => 'Option string as displayed to users - e.g. the label in an HTML OPTION tag.',
+ 'required' => true,
+ 'maxlength' => 512,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'value' => array(
+ 'name' => 'value',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Value') ,
+ 'description' => 'The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key.',
+ 'required' => true,
+ 'maxlength' => 512,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Name') ,
+ 'description' => 'Stores a fixed (non-translated) name for this option value. Lookup functions should use the name as the key for the option value row.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_option_value.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'grouping' => array(
+ 'name' => 'grouping',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Option Grouping Name') ,
+ 'description' => 'Use to sort and/or set display properties for sub-set(s) of options within an option group. EXAMPLE: Use for college_interest field, to differentiate partners from non-partners.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'filter' => array(
+ 'name' => 'filter',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Filter') ,
+ 'description' => 'Bitwise logic can be used to create subsets of options within an option_group for different uses.',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option is Default?') ,
+ 'description' => 'Is this the default option for the group?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Controls display sort order.',
+ 'required' => true,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Option Description') ,
+ 'description' => 'Optional description.',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_optgroup' => array(
+ 'name' => 'is_optgroup',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option is Header?') ,
+ 'description' => 'Is this row simply a display header? Expected usage is to render these as OPTGROUP tags within a SELECT field list of options?',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option Is Reserved?') ,
+ 'description' => 'Is this a predefined system object?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Option Is Active') ,
+ 'description' => 'Is this option active?',
+ 'default' => '1',
+ ) ,
+ 'component_id' => array(
+ 'name' => 'component_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Component') ,
+ 'description' => 'Component that this option value belongs/caters to.',
+ 'FKClassName' => 'CRM_Core_DAO_Component',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Domain') ,
+ 'description' => 'Which Domain is this option value for',
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'visibility_id' => array(
+ 'name' => 'visibility_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Option Visibility') ,
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'option_group_id' => 'option_group_id',
+ 'label' => 'label',
+ 'value' => 'value',
+ 'name' => 'name',
+ 'grouping' => 'grouping',
+ 'filter' => 'filter',
+ 'is_default' => 'is_default',
+ 'weight' => 'weight',
+ 'description' => 'description',
+ 'is_optgroup' => 'is_optgroup',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ 'component_id' => 'component_id',
+ 'domain_id' => 'domain_id',
+ 'visibility_id' => 'visibility_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['option_value'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['option_value'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Persistent.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:45370efa65bf803c7e12d00d96f32a22)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Persistent extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_persistent';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Persistent Record Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Context for which name data pair is to be stored
+ *
+ * @var string
+ */
+ public $context;
+ /**
+ * Name of Context
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * data associated with name
+ *
+ * @var longtext
+ */
+ public $data;
+ /**
+ * Config Settings
+ *
+ * @var boolean
+ */
+ public $is_config;
+ /**
+ * class constructor
+ *
+ * @return civicrm_persistent
+ */
+ function __construct() {
+ $this->__table = 'civicrm_persistent';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Persistent ID') ,
+ 'description' => 'Persistent Record Id',
+ 'required' => true,
+ ) ,
+ 'context' => array(
+ 'name' => 'context',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Context') ,
+ 'description' => 'Context for which name data pair is to be stored',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Name of Context',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Data') ,
+ 'description' => 'data associated with name',
+ ) ,
+ 'is_config' => array(
+ 'name' => 'is_config',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Configuration?') ,
+ 'description' => 'Config Settings',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'context' => 'context',
+ 'name' => 'name',
+ 'data' => 'data',
+ 'is_config' => 'is_config',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['persistent'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['persistent'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Phone.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:dfbacc644b095f173adcb2c97152192d)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Phone extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_phone';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Phone ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Which Location does this phone belong to.
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * Is this the primary phone for this contact and location.
+ *
+ * @var boolean
+ */
+ public $is_primary;
+ /**
+ * Is this the billing?
+ *
+ * @var boolean
+ */
+ public $is_billing;
+ /**
+ * Which Mobile Provider does this phone belong to.
+ *
+ * @var int unsigned
+ */
+ public $mobile_provider_id;
+ /**
+ * Complete phone number.
+ *
+ * @var string
+ */
+ public $phone;
+ /**
+ * Optional extension for a phone number.
+ *
+ * @var string
+ */
+ public $phone_ext;
+ /**
+ * Phone number stripped of all whitespace, letters, and punctuation.
+ *
+ * @var string
+ */
+ public $phone_numeric;
+ /**
+ * Which type of phone does this number belongs.
+ *
+ * @var int unsigned
+ */
+ public $phone_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_phone
+ */
+ function __construct() {
+ $this->__table = 'civicrm_phone';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone ID') ,
+ 'description' => 'Unique Phone ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone Contact') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone Location Type') ,
+ 'description' => 'Which Location does this phone belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_location_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'display_name',
+ )
+ ) ,
+ 'is_primary' => array(
+ 'name' => 'is_primary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Phone Primary?') ,
+ 'description' => 'Is this the primary phone for this contact and location.',
+ ) ,
+ 'is_billing' => array(
+ 'name' => 'is_billing',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Billing Phone') ,
+ 'description' => 'Is this the billing?',
+ ) ,
+ 'mobile_provider_id' => array(
+ 'name' => 'mobile_provider_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mobile Provider') ,
+ 'description' => 'Which Mobile Provider does this phone belong to.',
+ ) ,
+ 'phone' => array(
+ 'name' => 'phone',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Phone') ,
+ 'description' => 'Complete phone number.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'import' => true,
+ 'where' => 'civicrm_phone.phone',
+ 'headerPattern' => '/phone/i',
+ 'dataPattern' => '/^[\d\(\)\-\.\s]+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'phone_ext' => array(
+ 'name' => 'phone_ext',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Phone Extension') ,
+ 'description' => 'Optional extension for a phone number.',
+ 'maxlength' => 16,
+ 'size' => 4,
+ 'import' => true,
+ 'where' => 'civicrm_phone.phone_ext',
+ 'headerPattern' => '/extension/i',
+ 'dataPattern' => '/^\d+$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'phone_numeric' => array(
+ 'name' => 'phone_numeric',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Phone Numeric') ,
+ 'description' => 'Phone number stripped of all whitespace, letters, and punctuation.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'phone_type_id' => array(
+ 'name' => 'phone_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone Type') ,
+ 'description' => 'Which type of phone does this number belongs.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'phone_type',
+ 'optionEditPath' => 'civicrm/admin/options/phone_type',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'location_type_id' => 'location_type_id',
+ 'is_primary' => 'is_primary',
+ 'is_billing' => 'is_billing',
+ 'mobile_provider_id' => 'mobile_provider_id',
+ 'phone' => 'phone',
+ 'phone_ext' => 'phone_ext',
+ 'phone_numeric' => 'phone_numeric',
+ 'phone_type_id' => 'phone_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['phone'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['phone'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/PreferencesDate.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:097f0d4a35358bcecdbce07a99288b02)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_PreferencesDate extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_preferences_date';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The meta name for this date (fixed in code)
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of this date type.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * The start offset relative to current year
+ *
+ * @var int
+ */
+ public $start;
+ /**
+ * The end offset relative to current year, can be negative
+ *
+ * @var int
+ */
+ public $end;
+ /**
+ * The date type
+ *
+ * @var string
+ */
+ public $date_format;
+ /**
+ * time format
+ *
+ * @var string
+ */
+ public $time_format;
+ /**
+ * class constructor
+ *
+ * @return civicrm_preferences_date
+ */
+ function __construct() {
+ $this->__table = 'civicrm_preferences_date';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Date Preference ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Date Preference Name') ,
+ 'description' => 'The meta name for this date (fixed in code)',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Description of this date type.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'start' => array(
+ 'name' => 'start',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Start') ,
+ 'description' => 'The start offset relative to current year',
+ 'required' => true,
+ ) ,
+ 'end' => array(
+ 'name' => 'end',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('End Offset') ,
+ 'description' => 'The end offset relative to current year, can be negative',
+ 'required' => true,
+ ) ,
+ 'date_format' => array(
+ 'name' => 'date_format',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Date Format') ,
+ 'description' => 'The date type',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'time_format' => array(
+ 'name' => 'time_format',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Time Format') ,
+ 'description' => 'time format',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'start' => 'start',
+ 'end' => 'end',
+ 'date_format' => 'date_format',
+ 'time_format' => 'time_format',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['preferences_date'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['preferences_date'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/PrevNextCache.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:196227019da4fb47bac4ae93d159757a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_PrevNextCache extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_prevnext_cache';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to discount, e.g. civicrm_event
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id1;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id2;
+ /**
+ * Unique path name for cache element of the searched item
+ *
+ * @var string
+ */
+ public $cacheKey;
+ /**
+ * cached snapshot of the serialized data
+ *
+ * @var longtext
+ */
+ public $data;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_selected;
+ /**
+ * class constructor
+ *
+ * @return civicrm_prevnext_cache
+ */
+ function __construct() {
+ $this->__table = 'civicrm_prevnext_cache';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Prev Next Cache ID') ,
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Prev Next Entity Table') ,
+ 'description' => 'physical tablename for entity being joined to discount, e.g. civicrm_event',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id1' => array(
+ 'name' => 'entity_id1',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Prev Next Entity ID 1') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'entity_id2' => array(
+ 'name' => 'entity_id2',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Prev Next Entity ID 2') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'cacheKey' => array(
+ 'name' => 'cacheKey',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Cache Key') ,
+ 'description' => 'Unique path name for cache element of the searched item',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Prev Next Data') ,
+ 'description' => 'cached snapshot of the serialized data',
+ ) ,
+ 'is_selected' => array(
+ 'name' => 'is_selected',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Selected') ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id1' => 'entity_id1',
+ 'entity_id2' => 'entity_id2',
+ 'cacheKey' => 'cacheKey',
+ 'data' => 'data',
+ 'is_selected' => 'is_selected',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['prevnext_cache'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['prevnext_cache'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/PrintLabel.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b472155ff2882fa2c65222e6063f6507)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_PrintLabel extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_print_label';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * User title for for this label layout
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * variable name/programmatic handle for this field.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of this label layout
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * This refers to name column of civicrm_option_value row in name_badge option group
+ *
+ * @var string
+ */
+ public $label_format_name;
+ /**
+ * Implicit FK to civicrm_option_value row in NEW label_type option group
+ *
+ * @var int unsigned
+ */
+ public $label_type_id;
+ /**
+ * contains json encode configurations options
+ *
+ * @var longtext
+ */
+ public $data;
+ /**
+ * Is this default?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Is this option active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this reserved label?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * FK to civicrm_contact, who created this label layout
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_print_label
+ */
+ function __construct() {
+ $this->__table = 'civicrm_print_label';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Print Label ID') ,
+ 'required' => true,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title') ,
+ 'description' => 'User title for for this label layout',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'variable name/programmatic handle for this field.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Description') ,
+ 'description' => 'Description of this label layout',
+ ) ,
+ 'label_format_name' => array(
+ 'name' => 'label_format_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label Format') ,
+ 'description' => 'This refers to name column of civicrm_option_value row in name_badge option group',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'name_badge',
+ 'optionEditPath' => 'civicrm/admin/options/name_badge',
+ )
+ ) ,
+ 'label_type_id' => array(
+ 'name' => 'label_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Label Type') ,
+ 'description' => 'Implicit FK to civicrm_option_value row in NEW label_type option group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'label_type',
+ 'optionEditPath' => 'civicrm/admin/options/label_type',
+ )
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Data') ,
+ 'description' => 'contains json encode configurations options',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Label is Default?') ,
+ 'description' => 'Is this default?',
+ 'default' => '1',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Label Is Active?') ,
+ 'description' => 'Is this option active?',
+ 'default' => '1',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Label Reserved?') ,
+ 'description' => 'Is this reserved label?',
+ 'default' => '1',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Label Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this label layout',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'title' => 'title',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'label_format_name' => 'label_format_name',
+ 'label_type_id' => 'label_type_id',
+ 'data' => 'data',
+ 'is_default' => 'is_default',
+ 'is_active' => 'is_active',
+ 'is_reserved' => 'is_reserved',
+ 'created_id' => 'created_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['print_label'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['print_label'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/RecurringEntity.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b1fbcf5291f3766de514bcde365743a9)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_recurring_entity';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Recurring Entity Parent ID
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Recurring Entity Child ID
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Physical tablename for entity, e.g. civicrm_event
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * 1-this entity, 2-this and the following entities, 3-all the entities
+ *
+ * @var boolean
+ */
+ public $mode;
+ /**
+ * class constructor
+ *
+ * @return civicrm_recurring_entity
+ */
+ function __construct() {
+ $this->__table = 'civicrm_recurring_entity';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('ID') ,
+ 'required' => true,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent ID') ,
+ 'description' => 'Recurring Entity Parent ID',
+ 'required' => true,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'Recurring Entity Child ID',
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Physical tablename for entity, e.g. civicrm_event',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'mode' => array(
+ 'name' => 'mode',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Cascade Type') ,
+ 'description' => '1-this entity, 2-this and the following entities, 3-all the entities',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'parent_id' => 'parent_id',
+ 'entity_id' => 'entity_id',
+ 'entity_table' => 'entity_table',
+ 'mode' => 'mode',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['recurring_entity'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['recurring_entity'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Setting.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:4c444a8dbc1832972c356548e6dd48af)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Setting extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_setting';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Unique name for setting
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * data associated with this group / name combo
+ *
+ * @var text
+ */
+ public $value;
+ /**
+ * Which Domain is this menu item for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * FK to Contact ID if the setting is localized to a contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Is this setting a contact specific or site wide setting?
+ *
+ * @var boolean
+ */
+ public $is_domain;
+ /**
+ * Component that this menu item belongs to
+ *
+ * @var int unsigned
+ */
+ public $component_id;
+ /**
+ * When was the setting created
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * FK to civicrm_contact, who created this setting
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_setting
+ */
+ function __construct() {
+ $this->__table = 'civicrm_setting';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'component_id', 'civicrm_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Setting Name') ,
+ 'description' => 'Unique name for setting',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'value' => array(
+ 'name' => 'value',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Value') ,
+ 'description' => 'data associated with this group / name combo',
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting Domain') ,
+ 'description' => 'Which Domain is this menu item for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting Contact') ,
+ 'description' => 'FK to Contact ID if the setting is localized to a contact',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'is_domain' => array(
+ 'name' => 'is_domain',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Domain Setting?') ,
+ 'description' => 'Is this setting a contact specific or site wide setting?',
+ ) ,
+ 'component_id' => array(
+ 'name' => 'component_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting Component') ,
+ 'description' => 'Component that this menu item belongs to',
+ 'FKClassName' => 'CRM_Core_DAO_Component',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Setting Created Date') ,
+ 'description' => 'When was the setting created',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this setting',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'value' => 'value',
+ 'domain_id' => 'domain_id',
+ 'contact_id' => 'contact_id',
+ 'is_domain' => 'is_domain',
+ 'component_id' => 'component_id',
+ 'created_date' => 'created_date',
+ 'created_id' => 'created_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['setting'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['setting'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/StateProvince.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:eb9f2b5e6268fe81bf226acdc126d0dd)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_StateProvince extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_state_province';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * State/Province ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of State/Province
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * 2-4 Character Abbreviation of State/Province
+ *
+ * @var string
+ */
+ public $abbreviation;
+ /**
+ * ID of Country that State/Province belong
+ *
+ * @var int unsigned
+ */
+ public $country_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_state_province
+ */
+ function __construct() {
+ $this->__table = 'civicrm_state_province';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'country_id', 'civicrm_country', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('State ID') ,
+ 'description' => 'State/Province ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('State') ,
+ 'description' => 'Name of State/Province',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_state_province.name',
+ 'headerPattern' => '/state|prov(ince)?/i',
+ 'dataPattern' => '/[A-Z]{2}/',
+ 'export' => true,
+ ) ,
+ 'abbreviation' => array(
+ 'name' => 'abbreviation',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('State Abbreviation') ,
+ 'description' => '2-4 Character Abbreviation of State/Province',
+ 'maxlength' => 4,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'country_id' => array(
+ 'name' => 'country_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('County') ,
+ 'description' => 'ID of Country that State/Province belong',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Country',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'abbreviation' => 'abbreviation',
+ 'country_id' => 'country_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['state_province'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['state_province'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/StatusPreference.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:94258a10ef852fb171334d1f632f91e4)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_StatusPreference extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_status_pref';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique Status Preference ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this Status Preference for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Name of the status check this preference references.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * expires ignore_severity. NULL never hushes.
+ *
+ * @var date
+ */
+ public $hush_until;
+ /**
+ * Hush messages up to and including this severity.
+ *
+ * @var int unsigned
+ */
+ public $ignore_severity;
+ /**
+ * These settings are per-check, and can't be compared across checks.
+ *
+ * @var string
+ */
+ public $prefs;
+ /**
+ * These values are per-check, and can't be compared across checks.
+ *
+ * @var string
+ */
+ public $check_info;
+ /**
+ * class constructor
+ *
+ * @return civicrm_status_pref
+ */
+ function __construct() {
+ $this->__table = 'civicrm_status_pref';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Status Preference ID') ,
+ 'description' => 'Unique Status Preference ID',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Setting Domain') ,
+ 'description' => 'Which Domain is this Status Preference for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Status Check Name') ,
+ 'description' => 'Name of the status check this preference references.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_status_pref.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'hush_until' => array(
+ 'name' => 'hush_until',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Snooze Status Notifications Until') ,
+ 'description' => 'expires ignore_severity. NULL never hushes.',
+ 'import' => true,
+ 'where' => 'civicrm_status_pref.hush_until',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ ) ,
+ 'ignore_severity' => array(
+ 'name' => 'ignore_severity',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Ignore Severity') ,
+ 'description' => 'Hush messages up to and including this severity.',
+ 'import' => true,
+ 'where' => 'civicrm_status_pref.ignore_severity',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Utils_Check::getSeverityList',
+ )
+ ) ,
+ 'prefs' => array(
+ 'name' => 'prefs',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Status Preferences') ,
+ 'description' => 'These settings are per-check, and can\'t be compared across checks.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'check_info' => array(
+ 'name' => 'check_info',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Check Info') ,
+ 'description' => 'These values are per-check, and can\'t be compared across checks.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'name',
+ 'hush_until' => 'hush_until',
+ 'ignore_severity' => 'ignore_severity',
+ 'prefs' => 'prefs',
+ 'check_info' => 'check_info',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['status_pref'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['status_pref'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/SystemLog.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:23db96fd481ff90d7556cad2ae90560b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_SystemLog extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_system_log';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Primary key ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Standardized message
+ *
+ * @var string
+ */
+ public $message;
+ /**
+ * JSON encoded data
+ *
+ * @var longtext
+ */
+ public $context;
+ /**
+ * error level per PSR3
+ *
+ * @var string
+ */
+ public $level;
+ /**
+ * Timestamp of when event occurred.
+ *
+ * @var timestamp
+ */
+ public $timestamp;
+ /**
+ * Optional Contact ID that created the log. Not an FK as we keep this regardless
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Optional Name of logging host
+ *
+ * @var string
+ */
+ public $hostname;
+ /**
+ * class constructor
+ *
+ * @return civicrm_system_log
+ */
+ function __construct() {
+ $this->__table = 'civicrm_system_log';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('System Log ID') ,
+ 'description' => 'Primary key ID',
+ 'required' => true,
+ ) ,
+ 'message' => array(
+ 'name' => 'message',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('System Log Message') ,
+ 'description' => 'Standardized message',
+ 'required' => true,
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'context' => array(
+ 'name' => 'context',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Detailed Log Data') ,
+ 'description' => 'JSON encoded data',
+ ) ,
+ 'level' => array(
+ 'name' => 'level',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Detailed Log Data') ,
+ 'description' => 'error level per PSR3',
+ 'maxlength' => 9,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'default' => 'info',
+ ) ,
+ 'timestamp' => array(
+ 'name' => 'timestamp',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Log Timestamp') ,
+ 'description' => 'Timestamp of when event occurred.',
+ 'default' => 'CURRENT_TIMESTAMP',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Log Contact ID') ,
+ 'description' => 'Optional Contact ID that created the log. Not an FK as we keep this regardless',
+ ) ,
+ 'hostname' => array(
+ 'name' => 'hostname',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Log Host') ,
+ 'description' => 'Optional Name of logging host',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'message' => 'message',
+ 'context' => 'context',
+ 'level' => 'level',
+ 'timestamp' => 'timestamp',
+ 'contact_id' => 'contact_id',
+ 'hostname' => 'hostname',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['system_log'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['system_log'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Tag.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:2e064caca6ca7ac8e3078be52cb7c715)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Tag extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_tag';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Tag ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of Tag.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Optional verbose description of the tag.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Optional parent id for this tag.
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Is this tag selectable / displayed
+ *
+ * @var boolean
+ */
+ public $is_selectable;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_tagset;
+ /**
+ *
+ * @var string
+ */
+ public $used_for;
+ /**
+ * FK to civicrm_contact, who created this tag
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time that tag was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_tag
+ */
+ function __construct() {
+ $this->__table = 'civicrm_tag';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_tag', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Tag ID') ,
+ 'description' => 'Tag ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Tag Name') ,
+ 'description' => 'Name of Tag.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Optional verbose description of the tag.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent Tag') ,
+ 'description' => 'Optional parent id for this tag.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Tag',
+ ) ,
+ 'is_selectable' => array(
+ 'name' => 'is_selectable',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Display Tag?') ,
+ 'description' => 'Is this tag selectable / displayed',
+ 'default' => '1',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Reserved') ,
+ ) ,
+ 'is_tagset' => array(
+ 'name' => 'is_tagset',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Tagset') ,
+ ) ,
+ 'used_for' => array(
+ 'name' => 'used_for',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Used For') ,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'tag_used_for',
+ 'optionEditPath' => 'civicrm/admin/options/tag_used_for',
+ )
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Tag Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this tag',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Tag Created Date') ,
+ 'description' => 'Date and time that tag was created.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'parent_id' => 'parent_id',
+ 'is_selectable' => 'is_selectable',
+ 'is_reserved' => 'is_reserved',
+ 'is_tagset' => 'is_tagset',
+ 'used_for' => 'used_for',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['tag'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['tag'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Timezone.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:be63fa40c8b49d870a708348a633ed58)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Timezone extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_timezone';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Timezone Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Timezone full name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * ISO Code for timezone abbreviation
+ *
+ * @var string
+ */
+ public $abbreviation;
+ /**
+ * GMT name of the timezone
+ *
+ * @var string
+ */
+ public $gmt;
+ /**
+ *
+ * @var int
+ */
+ public $offset;
+ /**
+ * Country Id
+ *
+ * @var int unsigned
+ */
+ public $country_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_timezone
+ */
+ function __construct() {
+ $this->__table = 'civicrm_timezone';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'country_id', 'civicrm_country', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Timezone ID') ,
+ 'description' => 'Timezone Id',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Timezone Name') ,
+ 'description' => 'Timezone full name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'abbreviation' => array(
+ 'name' => 'abbreviation',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Timezone Abbreviation') ,
+ 'description' => 'ISO Code for timezone abbreviation',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ ) ,
+ 'gmt' => array(
+ 'name' => 'gmt',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('GMT Name of Timezone') ,
+ 'description' => 'GMT name of the timezone',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'offset' => array(
+ 'name' => 'offset',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('GMT Offset') ,
+ ) ,
+ 'country_id' => array(
+ 'name' => 'country_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Country') ,
+ 'description' => 'Country Id',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Country',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'abbreviation' => 'abbreviation',
+ 'gmt' => 'gmt',
+ 'offset' => 'offset',
+ 'country_id' => 'country_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['timezone'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['timezone'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/UFField.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3e8d84bf65b429f05dd199d739007bf0)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_UFField extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_uf_field';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which form does this field belong to.
+ *
+ * @var int unsigned
+ */
+ public $uf_group_id;
+ /**
+ * Name for CiviCRM field which is being exposed for sharing.
+ *
+ * @var string
+ */
+ public $field_name;
+ /**
+ * Is this field currently shareable? If false, hide the field for all sharing contexts.
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * the field is view only and not editable in user forms.
+ *
+ * @var boolean
+ */
+ public $is_view;
+ /**
+ * Is this field required when included in a user or registration form?
+ *
+ * @var boolean
+ */
+ public $is_required;
+ /**
+ * Controls field display order when user framework fields are displayed in registration and account editing forms.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Description and/or help text to display after this field.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Description and/or help text to display before this field.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * In what context(s) is this field visible.
+ *
+ * @var string
+ */
+ public $visibility;
+ /**
+ * Is this field included as a column in the selector table?
+ *
+ * @var boolean
+ */
+ public $in_selector;
+ /**
+ * Is this field included search form of profile?
+ *
+ * @var boolean
+ */
+ public $is_searchable;
+ /**
+ * Location type of this mapping, if required
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * Phone Type Id, if required
+ *
+ * @var int unsigned
+ */
+ public $phone_type_id;
+ /**
+ * Website Type Id, if required
+ *
+ * @var int unsigned
+ */
+ public $website_type_id;
+ /**
+ * To save label for fields.
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * This field saves field type (ie individual,household.. field etc).
+ *
+ * @var string
+ */
+ public $field_type;
+ /**
+ * Is this field reserved for use by some other CiviCRM functionality?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Include in multi-record listing?
+ *
+ * @var boolean
+ */
+ public $is_multi_summary;
+ /**
+ * class constructor
+ *
+ * @return civicrm_uf_field
+ */
+ function __construct() {
+ $this->__table = 'civicrm_uf_field';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'uf_group_id', 'civicrm_uf_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'location_type_id', 'civicrm_location_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Field ID') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'uf_group_id' => array(
+ 'name' => 'uf_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile ID') ,
+ 'description' => 'Which form does this field belong to.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_UFGroup',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_uf_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'field_name' => array(
+ 'name' => 'field_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Field Name') ,
+ 'description' => 'Name for CiviCRM field which is being exposed for sharing.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Is Active') ,
+ 'description' => 'Is this field currently shareable? If false, hide the field for all sharing contexts.',
+ 'default' => '1',
+ ) ,
+ 'is_view' => array(
+ 'name' => 'is_view',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Is View Only') ,
+ 'description' => 'the field is view only and not editable in user forms.',
+ ) ,
+ 'is_required' => array(
+ 'name' => 'is_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Is Required') ,
+ 'description' => 'Is this field required when included in a user or registration form?',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Controls field display order when user framework fields are displayed in registration and account editing forms.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Profile Field Post Help') ,
+ 'description' => 'Description and/or help text to display after this field.',
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Profile Field Pre Help') ,
+ 'description' => 'Description and/or help text to display before this field.',
+ ) ,
+ 'visibility' => array(
+ 'name' => 'visibility',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Field Visibility') ,
+ 'description' => 'In what context(s) is this field visible.',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'default' => 'User and User Admin Only',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::ufVisibility',
+ )
+ ) ,
+ 'in_selector' => array(
+ 'name' => 'in_selector',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Is a Filter') ,
+ 'description' => 'Is this field included as a column in the selector table?',
+ ) ,
+ 'is_searchable' => array(
+ 'name' => 'is_searchable',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Is Searchable') ,
+ 'description' => 'Is this field included search form of profile?',
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Field Location Type') ,
+ 'description' => 'Location type of this mapping, if required',
+ 'FKClassName' => 'CRM_Core_DAO_LocationType',
+ ) ,
+ 'phone_type_id' => array(
+ 'name' => 'phone_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Field Phone Type') ,
+ 'description' => 'Phone Type Id, if required',
+ ) ,
+ 'website_type_id' => array(
+ 'name' => 'website_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Field Website Type') ,
+ 'description' => 'Website Type Id, if required',
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Field Label') ,
+ 'description' => 'To save label for fields.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'field_type' => array(
+ 'name' => 'field_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Field Type') ,
+ 'description' => 'This field saves field type (ie individual,household.. field etc).',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Is Reserved') ,
+ 'description' => 'Is this field reserved for use by some other CiviCRM functionality?',
+ ) ,
+ 'is_multi_summary' => array(
+ 'name' => 'is_multi_summary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Field Supports Multiple') ,
+ 'description' => 'Include in multi-record listing?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'uf_group_id' => 'uf_group_id',
+ 'field_name' => 'field_name',
+ 'is_active' => 'is_active',
+ 'is_view' => 'is_view',
+ 'is_required' => 'is_required',
+ 'weight' => 'weight',
+ 'help_post' => 'help_post',
+ 'help_pre' => 'help_pre',
+ 'visibility' => 'visibility',
+ 'in_selector' => 'in_selector',
+ 'is_searchable' => 'is_searchable',
+ 'location_type_id' => 'location_type_id',
+ 'phone_type_id' => 'phone_type_id',
+ 'website_type_id' => 'website_type_id',
+ 'label' => 'label',
+ 'field_type' => 'field_type',
+ 'is_reserved' => 'is_reserved',
+ 'is_multi_summary' => 'is_multi_summary',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['uf_field'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['uf_field'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/UFGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7c181b05bc317bd96b74eccf5c3aa9ed)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_UFGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_uf_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Is this form currently active? If false, hide all related fields for all sharing contexts.
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * This column will store a comma separated list of the type(s) of profile fields.
+ *
+ * @var string
+ */
+ public $group_type;
+ /**
+ * Form title.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Optional verbose description of the profile.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Description and/or help text to display before fields in form.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Description and/or help text to display after fields in form.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Group id, foreign key from civicrm_group
+ *
+ * @var int unsigned
+ */
+ public $limit_listings_group_id;
+ /**
+ * Redirect to URL.
+ *
+ * @var string
+ */
+ public $post_URL;
+ /**
+ * foreign key to civicrm_group_id
+ *
+ * @var int unsigned
+ */
+ public $add_to_group_id;
+ /**
+ * Should a CAPTCHA widget be included this Profile form.
+ *
+ * @var boolean
+ */
+ public $add_captcha;
+ /**
+ * Do we want to map results from this profile.
+ *
+ * @var boolean
+ */
+ public $is_map;
+ /**
+ * Should edit link display in profile selector
+ *
+ * @var boolean
+ */
+ public $is_edit_link;
+ /**
+ * Should we display a link to the website profile in profile selector
+ *
+ * @var boolean
+ */
+ public $is_uf_link;
+ /**
+ * Should we update the contact record if we find a duplicate
+ *
+ * @var boolean
+ */
+ public $is_update_dupe;
+ /**
+ * Redirect to URL when Cancle button clik .
+ *
+ * @var string
+ */
+ public $cancel_URL;
+ /**
+ * Should we create a cms user for this profile
+ *
+ * @var boolean
+ */
+ public $is_cms_user;
+ /**
+ *
+ * @var text
+ */
+ public $notify;
+ /**
+ * Is this group reserved for use by some other CiviCRM functionality?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Name of the UF group for directly addressing it in the codebase
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * FK to civicrm_contact, who created this UF group
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time this UF group was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * Should we include proximity search feature in this profile search form?
+ *
+ * @var boolean
+ */
+ public $is_proximity_search;
+ /**
+ * class constructor
+ *
+ * @return civicrm_uf_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_uf_group';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'limit_listings_group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'add_to_group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile ID') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Is Active') ,
+ 'description' => 'Is this form currently active? If false, hide all related fields for all sharing contexts.',
+ 'default' => '1',
+ ) ,
+ 'group_type' => array(
+ 'name' => 'group_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Group Type') ,
+ 'description' => 'This column will store a comma separated list of the type(s) of profile fields.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_uf_group.group_type',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title') ,
+ 'description' => 'Form title.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Profile Description') ,
+ 'description' => 'Optional verbose description of the profile.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Help Pre') ,
+ 'description' => 'Description and/or help text to display before fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Profile Post Text') ,
+ 'description' => 'Description and/or help text to display after fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'limit_listings_group_id' => array(
+ 'name' => 'limit_listings_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Search Limit Group') ,
+ 'description' => 'Group id, foreign key from civicrm_group',
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ ) ,
+ 'post_URL' => array(
+ 'name' => 'post_URL',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Post Url') ,
+ 'description' => 'Redirect to URL.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'add_to_group_id' => array(
+ 'name' => 'add_to_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Add Contact To Group') ,
+ 'description' => 'foreign key to civicrm_group_id',
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ ) ,
+ 'add_captcha' => array(
+ 'name' => 'add_captcha',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Show Captcha On Profile') ,
+ 'description' => 'Should a CAPTCHA widget be included this Profile form.',
+ ) ,
+ 'is_map' => array(
+ 'name' => 'is_map',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Map Profile') ,
+ 'description' => 'Do we want to map results from this profile.',
+ ) ,
+ 'is_edit_link' => array(
+ 'name' => 'is_edit_link',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Show Edit Link?') ,
+ 'description' => 'Should edit link display in profile selector',
+ ) ,
+ 'is_uf_link' => array(
+ 'name' => 'is_uf_link',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Show Link to CMS User') ,
+ 'description' => 'Should we display a link to the website profile in profile selector',
+ ) ,
+ 'is_update_dupe' => array(
+ 'name' => 'is_update_dupe',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Update on Duplicate') ,
+ 'description' => 'Should we update the contact record if we find a duplicate',
+ ) ,
+ 'cancel_URL' => array(
+ 'name' => 'cancel_URL',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Cancel URL') ,
+ 'description' => 'Redirect to URL when Cancle button clik .',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_cms_user' => array(
+ 'name' => 'is_cms_user',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Create CMS User?') ,
+ 'description' => 'Should we create a cms user for this profile ',
+ ) ,
+ 'notify' => array(
+ 'name' => 'notify',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Notify on Profile Submit') ,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Is Reserved') ,
+ 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Name') ,
+ 'description' => 'Name of the UF group for directly addressing it in the codebase',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Created By') ,
+ 'description' => 'FK to civicrm_contact, who created this UF group',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('UF Group Created Date') ,
+ 'description' => 'Date and time this UF group was created.',
+ ) ,
+ 'is_proximity_search' => array(
+ 'name' => 'is_proximity_search',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Include Proximity Search?') ,
+ 'description' => 'Should we include proximity search feature in this profile search form?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'is_active' => 'is_active',
+ 'group_type' => 'group_type',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'limit_listings_group_id' => 'limit_listings_group_id',
+ 'post_URL' => 'post_URL',
+ 'add_to_group_id' => 'add_to_group_id',
+ 'add_captcha' => 'add_captcha',
+ 'is_map' => 'is_map',
+ 'is_edit_link' => 'is_edit_link',
+ 'is_uf_link' => 'is_uf_link',
+ 'is_update_dupe' => 'is_update_dupe',
+ 'cancel_URL' => 'cancel_URL',
+ 'is_cms_user' => 'is_cms_user',
+ 'notify' => 'notify',
+ 'is_reserved' => 'is_reserved',
+ 'name' => 'name',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'is_proximity_search' => 'is_proximity_search',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['uf_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['uf_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/UFJoin.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:e1e079058db4173c3780abfaf8ee98e9)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_UFJoin extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_uf_join';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique table ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Is this join currently active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.
+ *
+ * @var string
+ */
+ public $module;
+ /**
+ * Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Controls display order when multiple user framework groups are setup for concurrent display.
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Which form does this field belong to.
+ *
+ * @var int unsigned
+ */
+ public $uf_group_id;
+ /**
+ * Json serialized array of data used by the ufjoin.module
+ *
+ * @var longtext
+ */
+ public $module_data;
+ /**
+ * class constructor
+ *
+ * @return civicrm_uf_join
+ */
+ function __construct() {
+ $this->__table = 'civicrm_uf_join';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'uf_group_id', 'civicrm_uf_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('UF Join ID') ,
+ 'description' => 'Unique table ID',
+ 'required' => true,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Profile Use is active') ,
+ 'description' => 'Is this join currently active?',
+ 'default' => '1',
+ ) ,
+ 'module' => array(
+ 'name' => 'module',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Module') ,
+ 'description' => 'Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Profile Entity Table') ,
+ 'description' => 'Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_BAO_UFJoin::entityTables',
+ )
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile Entity ID') ,
+ 'description' => 'Foreign key to the referenced item.',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Controls display order when multiple user framework groups are setup for concurrent display.',
+ 'required' => true,
+ 'default' => '1',
+ ) ,
+ 'uf_group_id' => array(
+ 'name' => 'uf_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Profile ID') ,
+ 'description' => 'Which form does this field belong to.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_UFGroup',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_uf_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'module_data' => array(
+ 'name' => 'module_data',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Profile Use Data') ,
+ 'description' => 'Json serialized array of data used by the ufjoin.module',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'is_active' => 'is_active',
+ 'module' => 'module',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'weight' => 'weight',
+ 'uf_group_id' => 'uf_group_id',
+ 'module_data' => 'module_data',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['uf_join'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['uf_join'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/UFMatch.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3918388730a704a411f3b1daf2cdfded)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_UFMatch extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_uf_match';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * System generated ID.
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this match entry for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * UF ID
+ *
+ * @var int unsigned
+ */
+ public $uf_id;
+ /**
+ * UF Name
+ *
+ * @var string
+ */
+ public $uf_name;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * UI language preferred by the given user/contact
+ *
+ * @var string
+ */
+ public $language;
+ /**
+ * class constructor
+ *
+ * @return civicrm_uf_match
+ */
+ function __construct() {
+ $this->__table = 'civicrm_uf_match';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('UF Match ID') ,
+ 'description' => 'System generated ID.',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('UF Match Domain ID') ,
+ 'description' => 'Which Domain is this match entry for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'uf_id' => array(
+ 'name' => 'uf_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('CMS ID') ,
+ 'description' => 'UF ID',
+ 'required' => true,
+ ) ,
+ 'uf_name' => array(
+ 'name' => 'uf_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('CMS Unique Identifier') ,
+ 'description' => 'UF Name',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('CiviCRM Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'language' => array(
+ 'name' => 'language',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Preferred Language') ,
+ 'description' => 'UI language preferred by the given user/contact',
+ 'maxlength' => 5,
+ 'size' => CRM_Utils_Type::SIX,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'uf_id' => 'uf_id',
+ 'uf_name' => 'uf_name',
+ 'contact_id' => 'contact_id',
+ 'language' => 'language',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['uf_match'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['uf_match'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Website.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:105074f3140644df04a4d219436c8c5a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Website extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_website';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique Website ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Website
+ *
+ * @var string
+ */
+ public $url;
+ /**
+ * Which Website type does this website belong to.
+ *
+ * @var int unsigned
+ */
+ public $website_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_website
+ */
+ function __construct() {
+ $this->__table = 'civicrm_website';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Website ID') ,
+ 'description' => 'Unique Website ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'url' => array(
+ 'name' => 'url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Website') ,
+ 'description' => 'Website',
+ 'maxlength' => 128,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_website.url',
+ 'headerPattern' => '/Website/i',
+ 'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'website_type_id' => array(
+ 'name' => 'website_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Website Type') ,
+ 'description' => 'Which Website type does this website belong to.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'website_type',
+ 'optionEditPath' => 'civicrm/admin/options/website_type',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id' => 'contact_id',
+ 'url' => 'url',
+ 'website_type_id' => 'website_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['website'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['website'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/WordReplacement.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:d2a92fd9cc43494ed122fb08648bd0dc)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_WordReplacement extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_word_replacement';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Word replacement ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Word which need to be replaced
+ *
+ * @var string
+ */
+ public $find_word;
+ /**
+ * Word which will replace the word in find
+ *
+ * @var string
+ */
+ public $replace_word;
+ /**
+ * Is this entry active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ *
+ * @var string
+ */
+ public $match_type;
+ /**
+ * FK to Domain ID. This is for Domain specific word replacement
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_word_replacement
+ */
+ function __construct() {
+ $this->__table = 'civicrm_word_replacement';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Word Replacement ID') ,
+ 'description' => 'Word replacement ID',
+ 'required' => true,
+ ) ,
+ 'find_word' => array(
+ 'name' => 'find_word',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Replaced Word') ,
+ 'description' => 'Word which need to be replaced',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'replace_word' => array(
+ 'name' => 'replace_word',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Replacement Word') ,
+ 'description' => 'Word which will replace the word in find',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Word Replacement is Active') ,
+ 'description' => 'Is this entry active?',
+ 'default' => '1',
+ ) ,
+ 'match_type' => array(
+ 'name' => 'match_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Word Replacement Match Type') ,
+ 'maxlength' => 16,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'default' => 'wildcardMatch',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getWordReplacementMatchType',
+ )
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Word Replacement Domain ID') ,
+ 'description' => 'FK to Domain ID. This is for Domain specific word replacement',
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'find_word' => 'find_word',
+ 'replace_word' => 'replace_word',
+ 'is_active' => 'is_active',
+ 'match_type' => 'match_type',
+ 'domain_id' => 'domain_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['word_replacement'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['word_replacement'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Core/Worldregion.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b961975f645e99c61474d9e2718abdb5)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Core_DAO_Worldregion extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_worldregion';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Country Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Region name to be associated with countries
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * class constructor
+ *
+ * @return civicrm_worldregion
+ */
+ function __construct() {
+ $this->__table = 'civicrm_worldregion';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('World Region ID') ,
+ 'description' => 'Country Id',
+ 'required' => true,
+ ) ,
+ 'world_region' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('World Region') ,
+ 'description' => 'Region name to be associated with countries',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'export' => true,
+ 'where' => 'civicrm_worldregion.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'world_region',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['worldregion'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['worldregion'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Cxn/Cxn.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:36dd91f491a0a0fd197362ca88a247e0)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Cxn_DAO_Cxn extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_cxn';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Connection ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Application GUID
+ *
+ * @var string
+ */
+ public $app_guid;
+ /**
+ * Application Metadata (JSON)
+ *
+ * @var text
+ */
+ public $app_meta;
+ /**
+ * Connection GUID
+ *
+ * @var string
+ */
+ public $cxn_guid;
+ /**
+ * Shared secret
+ *
+ * @var text
+ */
+ public $secret;
+ /**
+ * Permissions approved for the service (JSON)
+ *
+ * @var text
+ */
+ public $perm;
+ /**
+ * Options for the service (JSON)
+ *
+ * @var text
+ */
+ public $options;
+ /**
+ * Is connection currently enabled?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * When was the connection was created.
+ *
+ * @var timestamp
+ */
+ public $created_date;
+ /**
+ * When the connection was created or modified.
+ *
+ * @var timestamp
+ */
+ public $modified_date;
+ /**
+ * The last time the application metadata was fetched.
+ *
+ * @var timestamp
+ */
+ public $fetched_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_cxn
+ */
+ function __construct() {
+ $this->__table = 'civicrm_cxn';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Connection ID') ,
+ 'description' => 'Connection ID',
+ 'required' => true,
+ ) ,
+ 'app_guid' => array(
+ 'name' => 'app_guid',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Application GUID') ,
+ 'description' => 'Application GUID',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'app_meta' => array(
+ 'name' => 'app_meta',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Application Metadata (JSON)') ,
+ 'description' => 'Application Metadata (JSON)',
+ ) ,
+ 'cxn_guid' => array(
+ 'name' => 'cxn_guid',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Connection GUID') ,
+ 'description' => 'Connection GUID',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'secret' => array(
+ 'name' => 'secret',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Secret') ,
+ 'description' => 'Shared secret',
+ ) ,
+ 'perm' => array(
+ 'name' => 'perm',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Perm') ,
+ 'description' => 'Permissions approved for the service (JSON)',
+ ) ,
+ 'options' => array(
+ 'name' => 'options',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Options') ,
+ 'description' => 'Options for the service (JSON)',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is connection currently enabled?',
+ 'default' => '1',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Created Date') ,
+ 'description' => 'When was the connection was created.',
+ 'required' => false,
+ 'default' => 'NULL',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Modified Date') ,
+ 'description' => 'When the connection was created or modified.',
+ 'required' => false,
+ 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
+ ) ,
+ 'fetched_date' => array(
+ 'name' => 'fetched_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Fetched Date') ,
+ 'description' => 'The last time the application metadata was fetched.',
+ 'required' => false,
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'app_guid' => 'app_guid',
+ 'app_meta' => 'app_meta',
+ 'cxn_guid' => 'cxn_guid',
+ 'secret' => 'secret',
+ 'perm' => 'perm',
+ 'options' => 'options',
+ 'is_active' => 'is_active',
+ 'created_date' => 'created_date',
+ 'modified_date' => 'modified_date',
+ 'fetched_date' => 'fetched_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['cxn'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['cxn'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Dedupe/Exception.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c583709d5754a27afc9654559385bcdb)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Dedupe_DAO_Exception extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_dedupe_exception';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique dedupe exception id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id1;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id2;
+ /**
+ * class constructor
+ *
+ * @return civicrm_dedupe_exception
+ */
+ function __construct() {
+ $this->__table = 'civicrm_dedupe_exception';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id1', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id2', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dedupe Exception ID') ,
+ 'description' => 'Unique dedupe exception id',
+ 'required' => true,
+ ) ,
+ 'contact_id1' => array(
+ 'name' => 'contact_id1',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('First Dupe Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'contact_id2' => array(
+ 'name' => 'contact_id2',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Second Dupe Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_id1' => 'contact_id1',
+ 'contact_id2' => 'contact_id2',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['dedupe_exception'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['dedupe_exception'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Dedupe/Rule.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:a968a54a593ab42c5c5e4fd3fe0b1bba)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Dedupe_DAO_Rule extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_dedupe_rule';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique dedupe rule id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The id of the rule group this rule belongs to
+ *
+ * @var int unsigned
+ */
+ public $dedupe_rule_group_id;
+ /**
+ * The name of the table this rule is about
+ *
+ * @var string
+ */
+ public $rule_table;
+ /**
+ * The name of the field of the table referenced in rule_table
+ *
+ * @var string
+ */
+ public $rule_field;
+ /**
+ * The length of the matching substring
+ *
+ * @var int unsigned
+ */
+ public $rule_length;
+ /**
+ * The weight of the rule
+ *
+ * @var int
+ */
+ public $rule_weight;
+ /**
+ * class constructor
+ *
+ * @return civicrm_dedupe_rule
+ */
+ function __construct() {
+ $this->__table = 'civicrm_dedupe_rule';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dedupe Rule ID') ,
+ 'description' => 'Unique dedupe rule id',
+ 'required' => true,
+ ) ,
+ 'dedupe_rule_group_id' => array(
+ 'name' => 'dedupe_rule_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dedupe Rule Group') ,
+ 'description' => 'The id of the rule group this rule belongs to',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
+ ) ,
+ 'rule_table' => array(
+ 'name' => 'rule_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Rule Table') ,
+ 'description' => 'The name of the table this rule is about',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'rule_field' => array(
+ 'name' => 'rule_field',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Rule Field') ,
+ 'description' => 'The name of the field of the table referenced in rule_table',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'rule_length' => array(
+ 'name' => 'rule_length',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Rule Length') ,
+ 'description' => 'The length of the matching substring',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'rule_weight' => array(
+ 'name' => 'rule_weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'The weight of the rule',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'dedupe_rule_group_id' => 'dedupe_rule_group_id',
+ 'rule_table' => 'rule_table',
+ 'rule_field' => 'rule_field',
+ 'rule_length' => 'rule_length',
+ 'rule_weight' => 'rule_weight',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['dedupe_rule'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['dedupe_rule'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Dedupe/RuleGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:e3970a441635e0aae612f5fd64cfc8da)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Dedupe_DAO_RuleGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_dedupe_rule_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Unique dedupe rule group id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The type of contacts this group applies to
+ *
+ * @var string
+ */
+ public $contact_type;
+ /**
+ * The weight threshold the sum of the rule weights has to cross to consider two contacts the same
+ *
+ * @var int
+ */
+ public $threshold;
+ /**
+ * Whether the rule should be used for cases where usage is Unsupervised, Supervised OR General(programatically)
+ *
+ * @var string
+ */
+ public $used;
+ /**
+ * Name of the rule group
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Label of the rule group
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_dedupe_rule_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_dedupe_rule_group';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Rule Group ID') ,
+ 'description' => 'Unique dedupe rule group id',
+ 'required' => true,
+ ) ,
+ 'contact_type' => array(
+ 'name' => 'contact_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Contact Type') ,
+ 'description' => 'The type of contacts this group applies to',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_contact_type',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'label',
+ 'condition' => 'parent_id IS NULL',
+ )
+ ) ,
+ 'threshold' => array(
+ 'name' => 'threshold',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Threshold') ,
+ 'description' => 'The weight threshold the sum of the rule weights has to cross to consider two contacts the same',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'used' => array(
+ 'name' => 'used',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Length') ,
+ 'description' => 'Whether the rule should be used for cases where usage is Unsupervised, Supervised OR General(programatically)',
+ 'required' => true,
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Radio',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getDedupeRuleTypes',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Name of the rule group',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title') ,
+ 'description' => 'Label of the rule group',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Reserved?') ,
+ 'description' => 'Is this a reserved rule - a rule group that has been optimized and cannot be changed by the admin',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'contact_type' => 'contact_type',
+ 'threshold' => 'threshold',
+ 'used' => 'used',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['dedupe_rule_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['dedupe_rule_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/Cart/Cart.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:5765a56738baad4ad007cd09b540ce86)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_Cart_DAO_Cart extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_event_carts';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Cart Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_contact who created this cart
+ *
+ * @var int unsigned
+ */
+ public $user_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $completed;
+ /**
+ * class constructor
+ *
+ * @return civicrm_event_carts
+ */
+ function __construct() {
+ $this->__table = 'civicrm_event_carts';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'user_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'cart_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Cart ID') ,
+ 'description' => 'Cart Id',
+ 'required' => true,
+ ) ,
+ 'user_id' => array(
+ 'name' => 'user_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Created By') ,
+ 'description' => 'FK to civicrm_contact who created this cart',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'completed' => array(
+ 'name' => 'completed',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Complete?') ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'cart_id',
+ 'user_id' => 'user_id',
+ 'completed' => 'completed',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['event_carts'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['event_carts'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/Cart/EventInCart.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:9a08efcac6a99827197e9bfe81ccca8a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_Cart_DAO_EventInCart extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_events_in_carts';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Event In Cart Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Event ID
+ *
+ * @var int unsigned
+ */
+ public $event_id;
+ /**
+ * FK to Event Cart ID
+ *
+ * @var int unsigned
+ */
+ public $event_cart_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_events_in_carts
+ */
+ function __construct() {
+ $this->__table = 'civicrm_events_in_carts';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_id', 'civicrm_event', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_cart_id', 'civicrm_event_carts', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'event_in_cart_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event In Cart') ,
+ 'description' => 'Event In Cart Id',
+ 'required' => true,
+ ) ,
+ 'event_id' => array(
+ 'name' => 'event_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event') ,
+ 'description' => 'FK to Event ID',
+ 'FKClassName' => 'CRM_Event_DAO_Event',
+ ) ,
+ 'event_cart_id' => array(
+ 'name' => 'event_cart_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event In Cart') ,
+ 'description' => 'FK to Event Cart ID',
+ 'FKClassName' => 'CRM_Event_Cart_DAO_Cart',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'event_in_cart_id',
+ 'event_id' => 'event_id',
+ 'event_cart_id' => 'event_cart_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['events_in_carts'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['events_in_carts'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/Event.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:63271b70ab38f49f251990114c5505fe)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_DAO_Event extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_event';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Event
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Event Title (e.g. Fall Fundraiser Dinner)
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.
+ *
+ * @var text
+ */
+ public $summary;
+ /**
+ * Full description of event. Text and html allowed. Displayed on built-in Event Information screens.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.
+ *
+ * @var int unsigned
+ */
+ public $event_type_id;
+ /**
+ * Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.
+ *
+ * @var int unsigned
+ */
+ public $participant_listing_id;
+ /**
+ * Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.
+ *
+ * @var boolean
+ */
+ public $is_public;
+ /**
+ * Date and time that event starts.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * Date and time that event ends. May be NULL if no defined end date/time
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * If true, include registration link on Event Info page.
+ *
+ * @var boolean
+ */
+ public $is_online_registration;
+ /**
+ * Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.
+ *
+ * @var string
+ */
+ public $registration_link_text;
+ /**
+ * Date and time that online registration starts.
+ *
+ * @var datetime
+ */
+ public $registration_start_date;
+ /**
+ * Date and time that online registration ends.
+ *
+ * @var datetime
+ */
+ public $registration_end_date;
+ /**
+ * Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.
+ *
+ * @var int unsigned
+ */
+ public $max_participants;
+ /**
+ * Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.
+ *
+ * @var text
+ */
+ public $event_full_text;
+ /**
+ * If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.
+ *
+ * @var boolean
+ */
+ public $is_monetary;
+ /**
+ * Financial type assigned to paid event registrations for this event. Required if is_monetary is true.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Payment Processors configured for this Event (if is_monetary is true)
+ *
+ * @var string
+ */
+ public $payment_processor;
+ /**
+ * Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?
+ *
+ * @var boolean
+ */
+ public $is_map;
+ /**
+ * Is this Event enabled or disabled/cancelled?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ *
+ * @var string
+ */
+ public $fee_label;
+ /**
+ * If true, show event location.
+ *
+ * @var boolean
+ */
+ public $is_show_location;
+ /**
+ * FK to Location Block ID
+ *
+ * @var int unsigned
+ */
+ public $loc_block_id;
+ /**
+ * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
+ *
+ * @var int unsigned
+ */
+ public $default_role_id;
+ /**
+ * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
+ *
+ * @var text
+ */
+ public $intro_text;
+ /**
+ * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
+ *
+ * @var text
+ */
+ public $footer_text;
+ /**
+ * Title for Confirmation page.
+ *
+ * @var string
+ */
+ public $confirm_title;
+ /**
+ * Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.
+ *
+ * @var text
+ */
+ public $confirm_text;
+ /**
+ * Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.
+ *
+ * @var text
+ */
+ public $confirm_footer_text;
+ /**
+ * If true, confirmation is automatically emailed to contact on successful registration.
+ *
+ * @var boolean
+ */
+ public $is_email_confirm;
+ /**
+ * text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now
+ *
+ * @var text
+ */
+ public $confirm_email_text;
+ /**
+ * FROM email name used for confirmation emails.
+ *
+ * @var string
+ */
+ public $confirm_from_name;
+ /**
+ * FROM email address used for confirmation emails.
+ *
+ * @var string
+ */
+ public $confirm_from_email;
+ /**
+ * comma-separated list of email addresses to cc each time a confirmation is sent
+ *
+ * @var string
+ */
+ public $cc_confirm;
+ /**
+ * comma-separated list of email addresses to bcc each time a confirmation is sent
+ *
+ * @var string
+ */
+ public $bcc_confirm;
+ /**
+ * FK to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $default_fee_id;
+ /**
+ * FK to civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $default_discount_fee_id;
+ /**
+ * Title for ThankYou page.
+ *
+ * @var string
+ */
+ public $thankyou_title;
+ /**
+ * ThankYou Text.
+ *
+ * @var text
+ */
+ public $thankyou_text;
+ /**
+ * Footer message.
+ *
+ * @var text
+ */
+ public $thankyou_footer_text;
+ /**
+ * if true - allows the user to send payment directly to the org later
+ *
+ * @var boolean
+ */
+ public $is_pay_later;
+ /**
+ * The text displayed to the user in the main form
+ *
+ * @var text
+ */
+ public $pay_later_text;
+ /**
+ * The receipt sent to the user instead of the normal receipt text
+ *
+ * @var text
+ */
+ public $pay_later_receipt;
+ /**
+ * is partial payment enabled for this event
+ *
+ * @var boolean
+ */
+ public $is_partial_payment;
+ /**
+ * Initial amount label for partial payment
+ *
+ * @var string
+ */
+ public $initial_amount_label;
+ /**
+ * Initial amount help text for partial payment
+ *
+ * @var text
+ */
+ public $initial_amount_help_text;
+ /**
+ * Minimum initial amount for partial payment
+ *
+ * @var float
+ */
+ public $min_initial_amount;
+ /**
+ * if true - allows the user to register multiple participants for event
+ *
+ * @var boolean
+ */
+ public $is_multiple_registrations;
+ /**
+ * Maximum number of additional participants that can be registered on a single booking
+ *
+ * @var int unsigned
+ */
+ public $max_additional_participants;
+ /**
+ * if true - allows the user to register multiple registrations from same email address.
+ *
+ * @var boolean
+ */
+ public $allow_same_participant_emails;
+ /**
+ * Whether the event has waitlist support.
+ *
+ * @var boolean
+ */
+ public $has_waitlist;
+ /**
+ * Whether participants require approval before they can finish registering.
+ *
+ * @var boolean
+ */
+ public $requires_approval;
+ /**
+ * Expire pending but unconfirmed registrations after this many hours.
+ *
+ * @var int unsigned
+ */
+ public $expiration_time;
+ /**
+ * Allow self service cancellation or transfer for event?
+ *
+ * @var boolean
+ */
+ public $allow_selfcancelxfer;
+ /**
+ * Number of hours prior to event start date to allow self-service cancellation or transfer.
+ *
+ * @var int unsigned
+ */
+ public $selfcancelxfer_time;
+ /**
+ * Text to display when the event is full, but participants can signup for a waitlist.
+ *
+ * @var text
+ */
+ public $waitlist_text;
+ /**
+ * Text to display when the approval is required to complete registration for an event.
+ *
+ * @var text
+ */
+ public $approval_req_text;
+ /**
+ * whether the event has template
+ *
+ * @var boolean
+ */
+ public $is_template;
+ /**
+ * Event Template Title
+ *
+ * @var string
+ */
+ public $template_title;
+ /**
+ * FK to civicrm_contact, who created this event
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time that event was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * The campaign for which this event has been created.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Can people share the event through social media?
+ *
+ * @var boolean
+ */
+ public $is_share;
+ /**
+ * If false, the event booking confirmation screen gets skipped
+ *
+ * @var boolean
+ */
+ public $is_confirm_enabled;
+ /**
+ * Implicit FK to civicrm_event: parent event
+ *
+ * @var int unsigned
+ */
+ public $parent_event_id;
+ /**
+ * Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.
+ *
+ * @var int unsigned
+ */
+ public $slot_label_id;
+ /**
+ * Rule to use when matching registrations for this event
+ *
+ * @var int unsigned
+ */
+ public $dedupe_rule_group_id;
+ /**
+ * if true than billing block is required this event
+ *
+ * @var boolean
+ */
+ public $is_billing_required;
+ /**
+ * class constructor
+ *
+ * @return civicrm_event
+ */
+ function __construct() {
+ $this->__table = 'civicrm_event';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'loc_block_id', 'civicrm_loc_block', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dedupe_rule_group_id', 'civicrm_dedupe_rule_group', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event ID') ,
+ 'description' => 'Event',
+ 'required' => true,
+ ) ,
+ 'event_title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Event Title') ,
+ 'description' => 'Event Title (e.g. Fall Fundraiser Dinner)',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_event.title',
+ 'headerPattern' => '/(event.)?title$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'summary' => array(
+ 'name' => 'summary',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Event Summary') ,
+ 'description' => 'Brief summary of event. Text and html allowed. Displayed on Event Registration form and can be used on other CMS pages which need an event summary.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'event_description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Event Description') ,
+ 'description' => 'Full description of event. Text and html allowed. Displayed on built-in Event Information screens.',
+ 'rows' => 8,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'event_type_id' => array(
+ 'name' => 'event_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Type') ,
+ 'description' => 'Event Type ID.Implicit FK to civicrm_option_value where option_group = event_type.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'event_type',
+ 'optionEditPath' => 'civicrm/admin/options/event_type',
+ )
+ ) ,
+ 'participant_listing_id' => array(
+ 'name' => 'participant_listing_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant Listing') ,
+ 'description' => 'Should we expose the participant list? Implicit FK to civicrm_option_value where option_group = participant_listing.',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'participant_listing',
+ 'optionEditPath' => 'civicrm/admin/options/participant_listing',
+ )
+ ) ,
+ 'is_public' => array(
+ 'name' => 'is_public',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Event Public') ,
+ 'description' => 'Public events will be included in the iCal feeds. Access to private event information may be limited using ACLs.',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'event_start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Event Start Date') ,
+ 'description' => 'Date and time that event starts.',
+ 'import' => true,
+ 'where' => 'civicrm_event.start_date',
+ 'headerPattern' => '/^start|(s(tart\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'event_end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Event End Date') ,
+ 'description' => 'Date and time that event ends. May be NULL if no defined end date/time',
+ 'import' => true,
+ 'where' => 'civicrm_event.end_date',
+ 'headerPattern' => '/^end|(e(nd\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'is_online_registration' => array(
+ 'name' => 'is_online_registration',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Online Registration') ,
+ 'description' => 'If true, include registration link on Event Info page.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'registration_link_text' => array(
+ 'name' => 'registration_link_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Event Registration Link Text') ,
+ 'description' => 'Text for link to Event Registration form which is displayed on Event Information screen when is_online_registration is true.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'registration_start_date' => array(
+ 'name' => 'registration_start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Registration Start Date') ,
+ 'description' => 'Date and time that online registration starts.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'registration_end_date' => array(
+ 'name' => 'registration_end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Registration End Date') ,
+ 'description' => 'Date and time that online registration ends.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'max_participants' => array(
+ 'name' => 'max_participants',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Max Participants') ,
+ 'description' => 'Maximum number of registered participants to allow. After max is reached, a custom Event Full message is displayed. If NULL, allow unlimited number of participants.',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'event_full_text' => array(
+ 'name' => 'event_full_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Event Information') ,
+ 'description' => 'Message to display on Event Information page and INSTEAD OF Event Registration form if maximum participants are signed up. Can include email address/info about getting on a waiting list, etc. Text and html allowed.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_monetary' => array(
+ 'name' => 'is_monetary',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is this a PAID event?') ,
+ 'description' => 'If true, one or more fee amounts must be set and a Payment Processor must be configured for Online Event Registration.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'Financial type assigned to paid event registrations for this event. Required if is_monetary is true.',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'payment_processor' => array(
+ 'name' => 'payment_processor',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Payment Processor') ,
+ 'description' => 'Payment Processors configured for this Event (if is_monetary is true)',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_payment_processor',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'is_map' => array(
+ 'name' => 'is_map',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Map Enabled') ,
+ 'description' => 'Include a map block on the Event Information page when geocode info is available and a mapping provider has been specified?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is this Event enabled or disabled/cancelled?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'fee_label' => array(
+ 'name' => 'fee_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Fee Label') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_event.fee_label',
+ 'headerPattern' => '/^fee|(f(ee\s)?label)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_show_location' => array(
+ 'name' => 'is_show_location',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('show location') ,
+ 'description' => 'If true, show event location.',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'loc_block_id' => array(
+ 'name' => 'loc_block_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Block ID') ,
+ 'description' => 'FK to Location Block ID',
+ 'FKClassName' => 'CRM_Core_DAO_LocBlock',
+ ) ,
+ 'default_role_id' => array(
+ 'name' => 'default_role_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Default Role') ,
+ 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
+ 'import' => true,
+ 'where' => 'civicrm_event.default_role_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'participant_role',
+ 'optionEditPath' => 'civicrm/admin/options/participant_role',
+ )
+ ) ,
+ 'intro_text' => array(
+ 'name' => 'intro_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Introductory Message') ,
+ 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'footer_text' => array(
+ 'name' => 'footer_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Footer Message') ,
+ 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'confirm_title' => array(
+ 'name' => 'confirm_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Confirmation Title') ,
+ 'description' => 'Title for Confirmation page.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'confirm_text' => array(
+ 'name' => 'confirm_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Confirm Text') ,
+ 'description' => 'Introductory message for Event Registration page. Text and html allowed. Displayed at the top of Event Registration form.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'confirm_footer_text' => array(
+ 'name' => 'confirm_footer_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Footer Text') ,
+ 'description' => 'Footer message for Event Registration page. Text and html allowed. Displayed at the bottom of Event Registration form.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_email_confirm' => array(
+ 'name' => 'is_email_confirm',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is confirm email') ,
+ 'description' => 'If true, confirmation is automatically emailed to contact on successful registration.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'confirm_email_text' => array(
+ 'name' => 'confirm_email_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Confirmation Email Text') ,
+ 'description' => 'text to include above standard event info on confirmation email. emails are text-only, so do not allow html for now',
+ 'rows' => 4,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'confirm_from_name' => array(
+ 'name' => 'confirm_from_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Confirm From Name') ,
+ 'description' => 'FROM email name used for confirmation emails.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'confirm_from_email' => array(
+ 'name' => 'confirm_from_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Confirm From Email') ,
+ 'description' => 'FROM email address used for confirmation emails.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'cc_confirm' => array(
+ 'name' => 'cc_confirm',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Cc Confirm') ,
+ 'description' => 'comma-separated list of email addresses to cc each time a confirmation is sent',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'bcc_confirm' => array(
+ 'name' => 'bcc_confirm',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Bcc Confirm') ,
+ 'description' => 'comma-separated list of email addresses to bcc each time a confirmation is sent',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'default_fee_id' => array(
+ 'name' => 'default_fee_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Default Fee ID') ,
+ 'description' => 'FK to civicrm_option_value.',
+ ) ,
+ 'default_discount_fee_id' => array(
+ 'name' => 'default_discount_fee_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Default Discount Fee ID') ,
+ 'description' => 'FK to civicrm_option_value.',
+ ) ,
+ 'thankyou_title' => array(
+ 'name' => 'thankyou_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('ThankYou Title') ,
+ 'description' => 'Title for ThankYou page.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'thankyou_text' => array(
+ 'name' => 'thankyou_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('ThankYou Text') ,
+ 'description' => 'ThankYou Text.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'thankyou_footer_text' => array(
+ 'name' => 'thankyou_footer_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Footer Text') ,
+ 'description' => 'Footer message.',
+ 'rows' => 6,
+ 'cols' => 50,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_pay_later' => array(
+ 'name' => 'is_pay_later',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Pay Later Allowed') ,
+ 'description' => 'if true - allows the user to send payment directly to the org later',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'pay_later_text' => array(
+ 'name' => 'pay_later_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Pay Later Text') ,
+ 'description' => 'The text displayed to the user in the main form',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'pay_later_receipt' => array(
+ 'name' => 'pay_later_receipt',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Pay Later Receipt Text') ,
+ 'description' => 'The receipt sent to the user instead of the normal receipt text',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_partial_payment' => array(
+ 'name' => 'is_partial_payment',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Partial Payments Enabled') ,
+ 'description' => 'is partial payment enabled for this event',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'initial_amount_label' => array(
+ 'name' => 'initial_amount_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Initial Amount Label') ,
+ 'description' => 'Initial amount label for partial payment',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'initial_amount_help_text' => array(
+ 'name' => 'initial_amount_help_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Initial Amount Help Text') ,
+ 'description' => 'Initial amount help text for partial payment',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'min_initial_amount' => array(
+ 'name' => 'min_initial_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Minimum Initial Amount') ,
+ 'description' => 'Minimum initial amount for partial payment',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_multiple_registrations' => array(
+ 'name' => 'is_multiple_registrations',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Multiple Registrations') ,
+ 'description' => 'if true - allows the user to register multiple participants for event',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'max_additional_participants' => array(
+ 'name' => 'max_additional_participants',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum number of additional participants per registration') ,
+ 'description' => 'Maximum number of additional participants that can be registered on a single booking',
+ ) ,
+ 'allow_same_participant_emails' => array(
+ 'name' => 'allow_same_participant_emails',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Does Event allow multiple registrations from same email address?') ,
+ 'description' => 'if true - allows the user to register multiple registrations from same email address.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'has_waitlist' => array(
+ 'name' => 'has_waitlist',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Waitlist Enabled') ,
+ 'description' => 'Whether the event has waitlist support.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'requires_approval' => array(
+ 'name' => 'requires_approval',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Requires Approval') ,
+ 'description' => 'Whether participants require approval before they can finish registering.',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'expiration_time' => array(
+ 'name' => 'expiration_time',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Expiration Time') ,
+ 'description' => 'Expire pending but unconfirmed registrations after this many hours.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'allow_selfcancelxfer' => array(
+ 'name' => 'allow_selfcancelxfer',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Self-service Cancellation or Transfer') ,
+ 'description' => 'Allow self service cancellation or transfer for event?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'selfcancelxfer_time' => array(
+ 'name' => 'selfcancelxfer_time',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Self-service Cancellation or Transfer Time') ,
+ 'description' => 'Number of hours prior to event start date to allow self-service cancellation or transfer.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'waitlist_text' => array(
+ 'name' => 'waitlist_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Waitlist Text') ,
+ 'description' => 'Text to display when the event is full, but participants can signup for a waitlist.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'approval_req_text' => array(
+ 'name' => 'approval_req_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Approval Req Text') ,
+ 'description' => 'Text to display when the approval is required to complete registration for an event.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_template' => array(
+ 'name' => 'is_template',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is an Event Template') ,
+ 'description' => 'whether the event has template',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'template_title' => array(
+ 'name' => 'template_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Event Template Title') ,
+ 'description' => 'Event Template Title',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_event.template_title',
+ 'headerPattern' => '/(template.)?title$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Created By Contact ID') ,
+ 'description' => 'FK to civicrm_contact, who created this event',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Event Created Date') ,
+ 'description' => 'Date and time that event was created.',
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'import' => true,
+ 'where' => 'civicrm_event.currency',
+ 'headerPattern' => '/cur(rency)?/i',
+ 'dataPattern' => '/^[A-Z]{3}$/i',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this event has been created.',
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'is_share' => array(
+ 'name' => 'is_share',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is shared through social media') ,
+ 'description' => 'Can people share the event through social media?',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_confirm_enabled' => array(
+ 'name' => 'is_confirm_enabled',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is the booking confirmation screen enabled?') ,
+ 'description' => 'If false, the event booking confirmation screen gets skipped',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'parent_event_id' => array(
+ 'name' => 'parent_event_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Parent Event ID') ,
+ 'description' => 'Implicit FK to civicrm_event: parent event',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'slot_label_id' => array(
+ 'name' => 'slot_label_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Subevent Slot Label ID') ,
+ 'description' => 'Subevent slot label. Implicit FK to civicrm_option_value where option_group = conference_slot.',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'dedupe_rule_group_id' => array(
+ 'name' => 'dedupe_rule_group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Dedupe Rule') ,
+ 'description' => 'Rule to use when matching registrations for this event',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Dedupe_DAO_RuleGroup',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_dedupe_rule_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'is_billing_required' => array(
+ 'name' => 'is_billing_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is billing block required') ,
+ 'description' => 'if true than billing block is required this event',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'title' => 'event_title',
+ 'summary' => 'summary',
+ 'description' => 'event_description',
+ 'event_type_id' => 'event_type_id',
+ 'participant_listing_id' => 'participant_listing_id',
+ 'is_public' => 'is_public',
+ 'start_date' => 'event_start_date',
+ 'end_date' => 'event_end_date',
+ 'is_online_registration' => 'is_online_registration',
+ 'registration_link_text' => 'registration_link_text',
+ 'registration_start_date' => 'registration_start_date',
+ 'registration_end_date' => 'registration_end_date',
+ 'max_participants' => 'max_participants',
+ 'event_full_text' => 'event_full_text',
+ 'is_monetary' => 'is_monetary',
+ 'financial_type_id' => 'financial_type_id',
+ 'payment_processor' => 'payment_processor',
+ 'is_map' => 'is_map',
+ 'is_active' => 'is_active',
+ 'fee_label' => 'fee_label',
+ 'is_show_location' => 'is_show_location',
+ 'loc_block_id' => 'loc_block_id',
+ 'default_role_id' => 'default_role_id',
+ 'intro_text' => 'intro_text',
+ 'footer_text' => 'footer_text',
+ 'confirm_title' => 'confirm_title',
+ 'confirm_text' => 'confirm_text',
+ 'confirm_footer_text' => 'confirm_footer_text',
+ 'is_email_confirm' => 'is_email_confirm',
+ 'confirm_email_text' => 'confirm_email_text',
+ 'confirm_from_name' => 'confirm_from_name',
+ 'confirm_from_email' => 'confirm_from_email',
+ 'cc_confirm' => 'cc_confirm',
+ 'bcc_confirm' => 'bcc_confirm',
+ 'default_fee_id' => 'default_fee_id',
+ 'default_discount_fee_id' => 'default_discount_fee_id',
+ 'thankyou_title' => 'thankyou_title',
+ 'thankyou_text' => 'thankyou_text',
+ 'thankyou_footer_text' => 'thankyou_footer_text',
+ 'is_pay_later' => 'is_pay_later',
+ 'pay_later_text' => 'pay_later_text',
+ 'pay_later_receipt' => 'pay_later_receipt',
+ 'is_partial_payment' => 'is_partial_payment',
+ 'initial_amount_label' => 'initial_amount_label',
+ 'initial_amount_help_text' => 'initial_amount_help_text',
+ 'min_initial_amount' => 'min_initial_amount',
+ 'is_multiple_registrations' => 'is_multiple_registrations',
+ 'max_additional_participants' => 'max_additional_participants',
+ 'allow_same_participant_emails' => 'allow_same_participant_emails',
+ 'has_waitlist' => 'has_waitlist',
+ 'requires_approval' => 'requires_approval',
+ 'expiration_time' => 'expiration_time',
+ 'allow_selfcancelxfer' => 'allow_selfcancelxfer',
+ 'selfcancelxfer_time' => 'selfcancelxfer_time',
+ 'waitlist_text' => 'waitlist_text',
+ 'approval_req_text' => 'approval_req_text',
+ 'is_template' => 'is_template',
+ 'template_title' => 'template_title',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'currency' => 'currency',
+ 'campaign_id' => 'campaign_id',
+ 'is_share' => 'is_share',
+ 'is_confirm_enabled' => 'is_confirm_enabled',
+ 'parent_event_id' => 'parent_event_id',
+ 'slot_label_id' => 'slot_label_id',
+ 'dedupe_rule_group_id' => 'dedupe_rule_group_id',
+ 'is_billing_required' => 'is_billing_required',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['event'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['event'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/Participant.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:de2c443480109499a83d620de7f4ac04)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_DAO_Participant extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_participant';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Participant Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to Event ID
+ *
+ * @var int unsigned
+ */
+ public $event_id;
+ /**
+ * Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.
+ *
+ * @var string
+ */
+ public $role_id;
+ /**
+ * When did contact register for event?
+ *
+ * @var datetime
+ */
+ public $register_date;
+ /**
+ * Source of this event registration.
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ * Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
+ we store the label value and not the key
+ *
+ * @var text
+ */
+ public $fee_level;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_pay_later;
+ /**
+ * actual processor fee if known - may be 0.
+ *
+ * @var float
+ */
+ public $fee_amount;
+ /**
+ * FK to Participant ID
+ *
+ * @var int unsigned
+ */
+ public $registered_by_id;
+ /**
+ * FK to Discount ID
+ *
+ * @var int unsigned
+ */
+ public $discount_id;
+ /**
+ * 3 character string, value derived from config setting.
+ *
+ * @var string
+ */
+ public $fee_currency;
+ /**
+ * The campaign for which this participant has been registered.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Discount Amount
+ *
+ * @var int unsigned
+ */
+ public $discount_amount;
+ /**
+ * FK to civicrm_event_carts
+ *
+ * @var int unsigned
+ */
+ public $cart_id;
+ /**
+ * On Waiting List
+ *
+ * @var int
+ */
+ public $must_wait;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $transferred_to_contact_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_participant
+ */
+ function __construct() {
+ $this->__table = 'civicrm_participant';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_id', 'civicrm_event', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_participant_status_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'registered_by_id', 'civicrm_participant', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'discount_id', 'civicrm_discount', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'cart_id', 'civicrm_event_carts', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'transferred_to_contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'participant_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant ID') ,
+ 'description' => 'Participant Id',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_participant.id',
+ 'headerPattern' => '/(^(participant(.)?)?id$)/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_participant.contact_id',
+ 'headerPattern' => '/contact(.?id)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'event_id' => array(
+ 'name' => 'event_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event') ,
+ 'description' => 'FK to Event ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_participant.event_id',
+ 'headerPattern' => '/event id$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Event_DAO_Event',
+ ) ,
+ 'participant_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant Status') ,
+ 'description' => 'Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_participant.status_id',
+ 'headerPattern' => '/(participant.)?(status)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => '1',
+ 'FKClassName' => 'CRM_Event_DAO_ParticipantStatusType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_participant_status_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'label',
+ )
+ ) ,
+ 'participant_role_id' => array(
+ 'name' => 'role_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Participant Role') ,
+ 'description' => 'Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_participant.role_id',
+ 'headerPattern' => '/(participant.)?(role)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'participant_role',
+ 'optionEditPath' => 'civicrm/admin/options/participant_role',
+ )
+ ) ,
+ 'participant_register_date' => array(
+ 'name' => 'register_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Register date') ,
+ 'description' => 'When did contact register for event?',
+ 'import' => true,
+ 'where' => 'civicrm_participant.register_date',
+ 'headerPattern' => '/^(r(egister\s)?date)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Participant Source') ,
+ 'description' => 'Source of this event registration.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_participant.source',
+ 'headerPattern' => '/(participant.)?(source)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_fee_level' => array(
+ 'name' => 'fee_level',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Fee level') ,
+ 'description' => 'Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
+ we store the label value and not the key
+ ',
+ 'import' => true,
+ 'where' => 'civicrm_participant.fee_level',
+ 'headerPattern' => '/^(f(ee\s)?level)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_participant.is_test',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_is_pay_later' => array(
+ 'name' => 'is_pay_later',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Pay Later') ,
+ 'import' => true,
+ 'where' => 'civicrm_participant.is_pay_later',
+ 'headerPattern' => '/(is.)?(pay(.)?later)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'participant_fee_amount' => array(
+ 'name' => 'fee_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Fee Amount') ,
+ 'description' => 'actual processor fee if known - may be 0.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_participant.fee_amount',
+ 'headerPattern' => '/fee(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ ) ,
+ 'participant_registered_by_id' => array(
+ 'name' => 'registered_by_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Registered By ID') ,
+ 'description' => 'FK to Participant ID',
+ 'import' => true,
+ 'where' => 'civicrm_participant.registered_by_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Event_DAO_Participant',
+ ) ,
+ 'participant_discount_id' => array(
+ 'name' => 'discount_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Discount ID') ,
+ 'description' => 'FK to Discount ID',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Discount',
+ ) ,
+ 'participant_fee_currency' => array(
+ 'name' => 'fee_currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Fee Currency') ,
+ 'description' => '3 character string, value derived from config setting.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'import' => true,
+ 'where' => 'civicrm_participant.fee_currency',
+ 'headerPattern' => '/(fee)?.?cur(rency)?/i',
+ 'dataPattern' => '/^[A-Z]{3}$/i',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'participant_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this participant has been registered.',
+ 'import' => true,
+ 'where' => 'civicrm_participant.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'discount_amount' => array(
+ 'name' => 'discount_amount',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Discount Amount') ,
+ 'description' => 'Discount Amount',
+ ) ,
+ 'cart_id' => array(
+ 'name' => 'cart_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Cart ID') ,
+ 'description' => 'FK to civicrm_event_carts',
+ 'FKClassName' => 'CRM_Event_Cart_DAO_Cart',
+ ) ,
+ 'must_wait' => array(
+ 'name' => 'must_wait',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Must Wait on List') ,
+ 'description' => 'On Waiting List',
+ ) ,
+ 'transferred_to_contact_id' => array(
+ 'name' => 'transferred_to_contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Transferred to Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'import' => true,
+ 'where' => 'civicrm_participant.transferred_to_contact_id',
+ 'headerPattern' => '/transfer(.?id)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'participant_id',
+ 'contact_id' => 'participant_contact_id',
+ 'event_id' => 'event_id',
+ 'status_id' => 'participant_status_id',
+ 'role_id' => 'participant_role_id',
+ 'register_date' => 'participant_register_date',
+ 'source' => 'participant_source',
+ 'fee_level' => 'participant_fee_level',
+ 'is_test' => 'participant_is_test',
+ 'is_pay_later' => 'participant_is_pay_later',
+ 'fee_amount' => 'participant_fee_amount',
+ 'registered_by_id' => 'participant_registered_by_id',
+ 'discount_id' => 'participant_discount_id',
+ 'fee_currency' => 'participant_fee_currency',
+ 'campaign_id' => 'participant_campaign_id',
+ 'discount_amount' => 'discount_amount',
+ 'cart_id' => 'cart_id',
+ 'must_wait' => 'must_wait',
+ 'transferred_to_contact_id' => 'transferred_to_contact_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['participant'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['participant'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/ParticipantPayment.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:8af5e49e84428c35963dc3e6188e0432)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_DAO_ParticipantPayment extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_participant_payment';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Participant Payment Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Participant Id (FK)
+ *
+ * @var int unsigned
+ */
+ public $participant_id;
+ /**
+ * FK to contribution table.
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_participant_payment
+ */
+ function __construct() {
+ $this->__table = 'civicrm_participant_payment';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'participant_id', 'civicrm_participant', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment ID') ,
+ 'description' => 'Participant Payment Id',
+ 'required' => true,
+ ) ,
+ 'participant_id' => array(
+ 'name' => 'participant_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant ID') ,
+ 'description' => 'Participant Id (FK)',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Event_DAO_Participant',
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution') ,
+ 'description' => 'FK to contribution table.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'participant_id' => 'participant_id',
+ 'contribution_id' => 'contribution_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['participant_payment'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['participant_payment'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Event/ParticipantStatusType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:279feacd07f5e1d3d4523455ab0231e7)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Event_DAO_ParticipantStatusType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_participant_status_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * unique participant status type id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * non-localized name of the status type
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * localized label for display of this status type
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * the general group of status type this one belongs to
+ *
+ * @var string
+ */
+ public $class;
+ /**
+ * whether this is a status type required by the system
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * whether this status type is active
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * whether this status type is counted against event size limit
+ *
+ * @var boolean
+ */
+ public $is_counted;
+ /**
+ * controls sort order
+ *
+ * @var int unsigned
+ */
+ public $weight;
+ /**
+ * whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group
+ *
+ * @var int unsigned
+ */
+ public $visibility_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_participant_status_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_participant_status_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant Status Type ID') ,
+ 'description' => 'unique participant status type id',
+ 'required' => true,
+ ) ,
+ 'participant_status' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Participant Status') ,
+ 'description' => 'non-localized name of the status type',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_participant_status_type.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Participant Status Label') ,
+ 'description' => 'localized label for display of this status type',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'class' => array(
+ 'name' => 'class',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Participant Status Class') ,
+ 'description' => 'the general group of status type this one belongs to',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Event_PseudoConstant::participantStatusClassOptions',
+ )
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Participant Status Is Reserved?>') ,
+ 'description' => 'whether this is a status type required by the system',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Participant Status is Active') ,
+ 'description' => 'whether this status type is active',
+ 'default' => '1',
+ ) ,
+ 'is_counted' => array(
+ 'name' => 'is_counted',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Participant Status Counts?') ,
+ 'description' => 'whether this status type is counted against event size limit',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'controls sort order',
+ 'required' => true,
+ ) ,
+ 'visibility_id' => array(
+ 'name' => 'visibility_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Participant Status Visibility') ,
+ 'description' => 'whether the status type is visible to the public, an implicit foreign key to option_value.value related to the `visibility` option_group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'visibility',
+ 'optionEditPath' => 'civicrm/admin/options/visibility',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'participant_status',
+ 'label' => 'label',
+ 'class' => 'class',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ 'is_counted' => 'is_counted',
+ 'weight' => 'weight',
+ 'visibility_id' => 'visibility_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['participant_status_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['participant_status_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/Currency.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:1f110824ead6f41762e514935415e66a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_Currency extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_currency';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Currency Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Currency Name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Currency Symbol
+ *
+ * @var string
+ */
+ public $symbol;
+ /**
+ * Numeric currency code
+ *
+ * @var string
+ */
+ public $numeric_code;
+ /**
+ * Full currency name
+ *
+ * @var string
+ */
+ public $full_name;
+ /**
+ * class constructor
+ *
+ * @return civicrm_currency
+ */
+ function __construct() {
+ $this->__table = 'civicrm_currency';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Currency ID') ,
+ 'description' => 'Currency Id',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => 'Currency Name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_currency.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'symbol' => array(
+ 'name' => 'symbol',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency Symbol') ,
+ 'description' => 'Currency Symbol',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'numeric_code' => array(
+ 'name' => 'numeric_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency Numeric Code') ,
+ 'description' => 'Numeric currency code',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'import' => true,
+ 'where' => 'civicrm_currency.numeric_code',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'full_name' => array(
+ 'name' => 'full_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Full Currency Name') ,
+ 'description' => 'Full currency name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'symbol' => 'symbol',
+ 'numeric_code' => 'numeric_code',
+ 'full_name' => 'full_name',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['currency'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['currency'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b4a912826592682a2909ad890e0c9ce6)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_entity_financial_account';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Links to an entity_table like civicrm_financial_type
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Links to an id in the entity_table, such as vid in civicrm_financial_type
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to a new civicrm_option_value (account_relationship)
+ *
+ * @var int unsigned
+ */
+ public $account_relationship;
+ /**
+ * FK to the financial_account_id
+ *
+ * @var int unsigned
+ */
+ public $financial_account_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_entity_financial_account
+ */
+ function __construct() {
+ $this->__table = 'civicrm_entity_financial_account';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_account_id', 'civicrm_financial_account', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity Financial Account ID') ,
+ 'description' => 'ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Links to an entity_table like civicrm_financial_type',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_entity_financial_account.entity_table',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'Links to an id in the entity_table, such as vid in civicrm_financial_type',
+ 'required' => true,
+ ) ,
+ 'account_relationship' => array(
+ 'name' => 'account_relationship',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Account Relationship') ,
+ 'description' => 'FK to a new civicrm_option_value (account_relationship)',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'account_relationship',
+ 'optionEditPath' => 'civicrm/admin/options/account_relationship',
+ )
+ ) ,
+ 'financial_account_id' => array(
+ 'name' => 'financial_account_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Account') ,
+ 'description' => 'FK to the financial_account_id',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_account',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'account_relationship' => 'account_relationship',
+ 'financial_account_id' => 'financial_account_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['entity_financial_account'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['entity_financial_account'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/EntityFinancialTrxn.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:bd0ed12f2215f8622cfb4647ca0ae050)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_entity_financial_trxn';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $financial_trxn_id;
+ /**
+ * allocated amount of transaction to this entity
+ *
+ * @var float
+ */
+ public $amount;
+ /**
+ * class constructor
+ *
+ * @return civicrm_entity_financial_trxn
+ */
+ function __construct() {
+ $this->__table = 'civicrm_entity_financial_trxn';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_trxn_id', 'civicrm_financial_trxn', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity Financial Transaction ID') ,
+ 'description' => 'ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_entity_financial_trxn.entity_table',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'required' => true,
+ ) ,
+ 'financial_trxn_id' => array(
+ 'name' => 'financial_trxn_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Transaction Id') ,
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialTrxn',
+ ) ,
+ 'amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Amount') ,
+ 'description' => 'allocated amount of transaction to this entity',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_entity_financial_trxn.amount',
+ 'headerPattern' => '/amount/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'financial_trxn_id' => 'financial_trxn_id',
+ 'amount' => 'amount',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['entity_financial_trxn'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['entity_financial_trxn'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/FinancialAccount.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:81859ed9d8791350520d6697aefcd0ab)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_FinancialAccount extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_financial_account';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Financial Account Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * FK to Contact ID that is responsible for the funds in this account
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * pseudo FK into civicrm_option_value.
+ *
+ * @var int unsigned
+ */
+ public $financial_account_type_id;
+ /**
+ * Optional value for mapping monies owed and received to accounting system codes.
+ *
+ * @var string
+ */
+ public $accounting_code;
+ /**
+ * Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).
+ *
+ * @var string
+ */
+ public $account_type_code;
+ /**
+ * Financial Type Description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Parent ID in account hierarchy
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?
+ *
+ * @var boolean
+ */
+ public $is_header_account;
+ /**
+ * Is this account tax-deductible?
+ *
+ * @var boolean
+ */
+ public $is_deductible;
+ /**
+ * Is this account for taxes?
+ *
+ * @var boolean
+ */
+ public $is_tax;
+ /**
+ * The percentage of the total_amount that is due for this tax.
+ *
+ * @var float
+ */
+ public $tax_rate;
+ /**
+ * Is this a predefined system object?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this account the default one (or default tax one) for its financial_account_type?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Contains the opening balance for this financial account
+ *
+ * @var float
+ */
+ public $opening_balance;
+ /**
+ * Contains the opening balance for the current period for this financial account
+ *
+ * @var float
+ */
+ public $current_period_opening_balance;
+ /**
+ * class constructor
+ *
+ * @return civicrm_financial_account
+ */
+ function __construct() {
+ $this->__table = 'civicrm_financial_account';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_financial_account', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Account ID') ,
+ 'description' => 'ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Account Name') ,
+ 'description' => 'Financial Account Name.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'financial_account_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID that is responsible for the funds in this account',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'financial_account_type_id' => array(
+ 'name' => 'financial_account_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Account Type') ,
+ 'description' => 'pseudo FK into civicrm_option_value.',
+ 'required' => true,
+ 'default' => '3',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'financial_account_type',
+ 'optionEditPath' => 'civicrm/admin/options/financial_account_type',
+ )
+ ) ,
+ 'accounting_code' => array(
+ 'name' => 'accounting_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Accounting Code') ,
+ 'description' => 'Optional value for mapping monies owed and received to accounting system codes.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'export' => true,
+ 'where' => 'civicrm_financial_account.accounting_code',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'account_type_code' => array(
+ 'name' => 'account_type_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Account Type Code') ,
+ 'description' => 'Optional value for mapping account types to accounting system account categories (QuickBooks Account Type Codes for example).',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'export' => true,
+ 'where' => 'civicrm_financial_account.account_type_code',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Account Description') ,
+ 'description' => 'Financial Type Description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Account Parent') ,
+ 'description' => 'Parent ID in account hierarchy',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
+ ) ,
+ 'is_header_account' => array(
+ 'name' => 'is_header_account',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Header Financial Account?') ,
+ 'description' => 'Is this a header account which does not allow transactions to be posted against it directly, but only to its sub-accounts?',
+ ) ,
+ 'is_deductible' => array(
+ 'name' => 'is_deductible',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Deductible Financial Account?') ,
+ 'description' => 'Is this account tax-deductible?',
+ 'default' => '1',
+ ) ,
+ 'is_tax' => array(
+ 'name' => 'is_tax',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Tax Financial Account?') ,
+ 'description' => 'Is this account for taxes?',
+ ) ,
+ 'tax_rate' => array(
+ 'name' => 'tax_rate',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Financial Account Tax Rate') ,
+ 'description' => 'The percentage of the total_amount that is due for this tax.',
+ 'precision' => array(
+ 10,
+ 8
+ ) ,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Reserved Financial Account?') ,
+ 'description' => 'Is this a predefined system object?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Financial Account is Active') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Default Financial Account') ,
+ 'description' => 'Is this account the default one (or default tax one) for its financial_account_type?',
+ ) ,
+ 'opening_balance' => array(
+ 'name' => 'opening_balance',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Opening Balance') ,
+ 'description' => 'Contains the opening balance for this financial account',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'current_period_opening_balance' => array(
+ 'name' => 'current_period_opening_balance',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Current period opening Balance') ,
+ 'description' => 'Contains the opening balance for the current period for this financial account',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'contact_id' => 'financial_account_contact_id',
+ 'financial_account_type_id' => 'financial_account_type_id',
+ 'accounting_code' => 'accounting_code',
+ 'account_type_code' => 'account_type_code',
+ 'description' => 'description',
+ 'parent_id' => 'parent_id',
+ 'is_header_account' => 'is_header_account',
+ 'is_deductible' => 'is_deductible',
+ 'is_tax' => 'is_tax',
+ 'tax_rate' => 'tax_rate',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ 'is_default' => 'is_default',
+ 'opening_balance' => 'opening_balance',
+ 'current_period_opening_balance' => 'current_period_opening_balance',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['financial_account'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['financial_account'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/FinancialItem.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:576910be69f2500aa8b4f37cc6b823ad)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_FinancialItem extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_financial_item';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Date and time the item was created
+ *
+ * @var timestamp
+ */
+ public $created_date;
+ /**
+ * Date and time of the source transaction
+ *
+ * @var datetime
+ */
+ public $transaction_date;
+ /**
+ * FK to Contact ID of contact the item is from
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Human readable description of this item, to ease display without lookup of source item.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Total amount of this item
+ *
+ * @var float
+ */
+ public $amount;
+ /**
+ * Currency for the amount
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * FK to civicrm_financial_account
+ *
+ * @var int unsigned
+ */
+ public $financial_account_id;
+ /**
+ * Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * The table providing the source of this item such as civicrm_line_item
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * The specific source item that is responsible for the creation of this financial_item
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_financial_item
+ */
+ function __construct() {
+ $this->__table = 'civicrm_financial_item';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_account_id', 'civicrm_financial_account', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Item ID') ,
+ 'required' => true,
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Financial Item Created Date') ,
+ 'description' => 'Date and time the item was created',
+ 'required' => true,
+ 'default' => 'CURRENT_TIMESTAMP',
+ ) ,
+ 'transaction_date' => array(
+ 'name' => 'transaction_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Financial Item Transaction Date') ,
+ 'description' => 'Date and time of the source transaction',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Item Contact ID') ,
+ 'description' => 'FK to Contact ID of contact the item is from',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_financial_item.contact_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Item Description') ,
+ 'description' => 'Human readable description of this item, to ease display without lookup of source item.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Amount') ,
+ 'description' => 'Total amount of this item',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Item Currency') ,
+ 'description' => 'Currency for the amount',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'export' => true,
+ 'where' => 'civicrm_financial_item.currency',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'financial_account_id' => array(
+ 'name' => 'financial_account_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Account ID') ,
+ 'description' => 'FK to civicrm_financial_account',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_account',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Item Status ID') ,
+ 'description' => 'Payment status: test, paid, part_paid, unpaid (if empty assume unpaid)',
+ 'export' => true,
+ 'where' => 'civicrm_financial_item.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'financial_item_status',
+ 'optionEditPath' => 'civicrm/admin/options/financial_item_status',
+ )
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'The table providing the source of this item such as civicrm_line_item',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'The specific source item that is responsible for the creation of this financial_item',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'created_date' => 'created_date',
+ 'transaction_date' => 'transaction_date',
+ 'contact_id' => 'contact_id',
+ 'description' => 'description',
+ 'amount' => 'amount',
+ 'currency' => 'currency',
+ 'financial_account_id' => 'financial_account_id',
+ 'status_id' => 'status_id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['financial_item'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['financial_item'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/FinancialTrxn.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b2348b24a7c2110f15b8e1a2a4d1e7b3)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_FinancialTrxn extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_financial_trxn';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to financial_account table.
+ *
+ * @var int unsigned
+ */
+ public $from_financial_account_id;
+ /**
+ * FK to financial_financial_account table.
+ *
+ * @var int unsigned
+ */
+ public $to_financial_account_id;
+ /**
+ * date transaction occurred
+ *
+ * @var datetime
+ */
+ public $trxn_date;
+ /**
+ * amount of transaction
+ *
+ * @var float
+ */
+ public $total_amount;
+ /**
+ * actual processor fee if known - may be 0.
+ *
+ * @var float
+ */
+ public $fee_amount;
+ /**
+ * actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.
+ *
+ * @var float
+ */
+ public $net_amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * Is this entry either a payment or a reversal of a payment?
+ *
+ * @var boolean
+ */
+ public $is_payment;
+ /**
+ * Transaction id supplied by external processor. This may not be unique.
+ *
+ * @var string
+ */
+ public $trxn_id;
+ /**
+ * processor result code
+ *
+ * @var string
+ */
+ public $trxn_result_code;
+ /**
+ * pseudo FK to civicrm_option_value of contribution_status_id option_group
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * Payment Processor for this financial transaction
+ *
+ * @var int unsigned
+ */
+ public $payment_processor_id;
+ /**
+ * FK to payment_instrument option group values
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ * Check number
+ *
+ * @var string
+ */
+ public $check_number;
+ /**
+ * class constructor
+ *
+ * @return civicrm_financial_trxn
+ */
+ function __construct() {
+ $this->__table = 'civicrm_financial_trxn';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'from_financial_account_id', 'civicrm_financial_account', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'to_financial_account_id', 'civicrm_financial_account', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_id', 'civicrm_payment_processor', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Transaction ID') ,
+ 'required' => true,
+ ) ,
+ 'from_financial_account_id' => array(
+ 'name' => 'from_financial_account_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Transaction From Account') ,
+ 'description' => 'FK to financial_account table.',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_account',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'to_financial_account_id' => array(
+ 'name' => 'to_financial_account_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Transaction To Account') ,
+ 'description' => 'FK to financial_financial_account table.',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_account',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'trxn_date' => array(
+ 'name' => 'trxn_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Financial Transaction Date') ,
+ 'description' => 'date transaction occurred',
+ 'default' => 'NULL',
+ ) ,
+ 'total_amount' => array(
+ 'name' => 'total_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Financial Total Amount') ,
+ 'description' => 'amount of transaction',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'fee_amount' => array(
+ 'name' => 'fee_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Financial Fee Amount') ,
+ 'description' => 'actual processor fee if known - may be 0.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'net_amount' => array(
+ 'name' => 'net_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Financial Net Amount') ,
+ 'description' => 'actual funds transfer amount. total less fees. if processor does not report actual fee during transaction, this is set to total_amount.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'import' => true,
+ 'where' => 'civicrm_financial_trxn.currency',
+ 'headerPattern' => '/cur(rency)?/i',
+ 'dataPattern' => '/^[A-Z]{3}$/',
+ 'export' => true,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'is_payment' => array(
+ 'name' => 'is_payment',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Payment?') ,
+ 'description' => 'Is this entry either a payment or a reversal of a payment?',
+ 'import' => true,
+ 'where' => 'civicrm_financial_trxn.is_payment',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'trxn_id' => array(
+ 'name' => 'trxn_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Transaction ID') ,
+ 'description' => 'Transaction id supplied by external processor. This may not be unique.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'trxn_result_code' => array(
+ 'name' => 'trxn_result_code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Transaction Result Code') ,
+ 'description' => 'processor result code',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Transaction Status Id') ,
+ 'description' => 'pseudo FK to civicrm_option_value of contribution_status_id option_group',
+ 'import' => true,
+ 'where' => 'civicrm_financial_trxn.status_id',
+ 'headerPattern' => '/status/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'contribution_status',
+ 'optionEditPath' => 'civicrm/admin/options/contribution_status',
+ )
+ ) ,
+ 'payment_processor_id' => array(
+ 'name' => 'payment_processor_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor') ,
+ 'description' => 'Payment Processor for this financial transaction',
+ 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor',
+ ) ,
+ 'financial_trxn_payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Method') ,
+ 'description' => 'FK to payment_instrument option group values',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ 'financial_trxn_check_number' => array(
+ 'name' => 'check_number',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Check Number') ,
+ 'description' => 'Check number',
+ 'maxlength' => 255,
+ 'size' => 6,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'from_financial_account_id' => 'from_financial_account_id',
+ 'to_financial_account_id' => 'to_financial_account_id',
+ 'trxn_date' => 'trxn_date',
+ 'total_amount' => 'total_amount',
+ 'fee_amount' => 'fee_amount',
+ 'net_amount' => 'net_amount',
+ 'currency' => 'currency',
+ 'is_payment' => 'is_payment',
+ 'trxn_id' => 'trxn_id',
+ 'trxn_result_code' => 'trxn_result_code',
+ 'status_id' => 'status_id',
+ 'payment_processor_id' => 'payment_processor_id',
+ 'payment_instrument_id' => 'financial_trxn_payment_instrument_id',
+ 'check_number' => 'financial_trxn_check_number',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['financial_trxn'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['financial_trxn'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/FinancialType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:32e42bc2470f618adeabbce5977e6d6b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_FinancialType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_financial_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * ID of original financial_type so you can search this table by the financial_type.id and then select the relevant version based on the timestamp
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Financial Type Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Financial Type Description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Is this financial type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.
+ *
+ * @var boolean
+ */
+ public $is_deductible;
+ /**
+ * Is this a predefined system object?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_financial_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_financial_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type ID') ,
+ 'description' => 'ID of original financial_type so you can search this table by the financial_type.id and then select the relevant version based on the timestamp',
+ 'required' => true,
+ ) ,
+ 'financial_type' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'Financial Type Name.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'import' => true,
+ 'where' => 'civicrm_financial_type.name',
+ 'headerPattern' => '/(finan(cial)?)?type/i',
+ 'dataPattern' => '/donation|member|campaign/i',
+ 'export' => true,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Description') ,
+ 'description' => 'Financial Type Description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_deductible' => array(
+ 'name' => 'is_deductible',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Tax Deductible?') ,
+ 'description' => 'Is this financial type tax-deductible? If true, contributions of this type may be fully OR partially deductible - non-deductible amount is stored in the Contribution record.',
+ 'default' => '1',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Financial Type is Reserved?') ,
+ 'description' => 'Is this a predefined system object?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Financial Type Is Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'financial_type',
+ 'description' => 'description',
+ 'is_deductible' => 'is_deductible',
+ 'is_reserved' => 'is_reserved',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['financial_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['financial_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:fca1e9bcf120d0c92b0b23ebd42df28b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_payment_processor';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Payment Processor ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this match entry for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Payment Processor Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Payment Processor Description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $payment_processor_type_id;
+ /**
+ * Is this processor active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this processor the default?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Is this processor for a test site?
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ *
+ * @var string
+ */
+ public $user_name;
+ /**
+ *
+ * @var string
+ */
+ public $password;
+ /**
+ *
+ * @var text
+ */
+ public $signature;
+ /**
+ *
+ * @var string
+ */
+ public $url_site;
+ /**
+ *
+ * @var string
+ */
+ public $url_api;
+ /**
+ *
+ * @var string
+ */
+ public $url_recur;
+ /**
+ *
+ * @var string
+ */
+ public $url_button;
+ /**
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ *
+ * @var string
+ */
+ public $class_name;
+ /**
+ * Billing Mode (deprecated)
+ *
+ * @var int unsigned
+ */
+ public $billing_mode;
+ /**
+ * Can process recurring contributions
+ *
+ * @var boolean
+ */
+ public $is_recur;
+ /**
+ * Payment Type: Credit or Debit (deprecated)
+ *
+ * @var int unsigned
+ */
+ public $payment_type;
+ /**
+ * Payment Instrument ID
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_payment_processor
+ */
+ function __construct() {
+ $this->__table = 'civicrm_payment_processor';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor ID') ,
+ 'description' => 'Payment Processor ID',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor Domain') ,
+ 'description' => 'Which Domain is this match entry for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Payment Processor') ,
+ 'description' => 'Payment Processor Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Processor Description') ,
+ 'description' => 'Payment Processor Description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'payment_processor_type_id' => array(
+ 'name' => 'payment_processor_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor Type ID') ,
+ 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_payment_processor_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor is Active?') ,
+ 'description' => 'Is this processor active?',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor Is Default?') ,
+ 'description' => 'Is this processor the default?',
+ ) ,
+ 'is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Test Processor?') ,
+ 'description' => 'Is this processor for a test site?',
+ ) ,
+ 'user_name' => array(
+ 'name' => 'user_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('User Name') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'password' => array(
+ 'name' => 'password',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Password') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'signature' => array(
+ 'name' => 'signature',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Signature') ,
+ ) ,
+ 'url_site' => array(
+ 'name' => 'url_site',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Site URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_api' => array(
+ 'name' => 'url_api',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('API URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_recur' => array(
+ 'name' => 'url_recur',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Recurring Payments URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_button' => array(
+ 'name' => 'url_button',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Button URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Subject') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'class_name' => array(
+ 'name' => 'class_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Suffix for PHP class name implementation') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'billing_mode' => array(
+ 'name' => 'billing_mode',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Processor Billing Mode') ,
+ 'description' => 'Billing Mode (deprecated)',
+ 'required' => true,
+ ) ,
+ 'is_recur' => array(
+ 'name' => 'is_recur',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor Supports Recurring?') ,
+ 'description' => 'Can process recurring contributions',
+ ) ,
+ 'payment_type' => array(
+ 'name' => 'payment_type',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Type') ,
+ 'description' => 'Payment Type: Credit or Debit (deprecated)',
+ 'default' => '1',
+ ) ,
+ 'payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Method') ,
+ 'description' => 'Payment Instrument ID',
+ 'default' => '1',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'payment_processor_type_id' => 'payment_processor_type_id',
+ 'is_active' => 'is_active',
+ 'is_default' => 'is_default',
+ 'is_test' => 'is_test',
+ 'user_name' => 'user_name',
+ 'password' => 'password',
+ 'signature' => 'signature',
+ 'url_site' => 'url_site',
+ 'url_api' => 'url_api',
+ 'url_recur' => 'url_recur',
+ 'url_button' => 'url_button',
+ 'subject' => 'subject',
+ 'class_name' => 'class_name',
+ 'billing_mode' => 'billing_mode',
+ 'is_recur' => 'is_recur',
+ 'payment_type' => 'payment_type',
+ 'payment_instrument_id' => 'payment_instrument_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['payment_processor'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['payment_processor'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/PaymentProcessorType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0b78b69015bf553f4f470cd3e6361d8a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_PaymentProcessorType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_payment_processor_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Payment Processor Type ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Payment Processor Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Payment Processor Name.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Payment Processor Description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Is this processor active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this processor the default?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ *
+ * @var string
+ */
+ public $user_name_label;
+ /**
+ *
+ * @var string
+ */
+ public $password_label;
+ /**
+ *
+ * @var string
+ */
+ public $signature_label;
+ /**
+ *
+ * @var string
+ */
+ public $subject_label;
+ /**
+ *
+ * @var string
+ */
+ public $class_name;
+ /**
+ *
+ * @var string
+ */
+ public $url_site_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_api_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_recur_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_button_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_site_test_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_api_test_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_recur_test_default;
+ /**
+ *
+ * @var string
+ */
+ public $url_button_test_default;
+ /**
+ * Billing Mode (deprecated)
+ *
+ * @var int unsigned
+ */
+ public $billing_mode;
+ /**
+ * Can process recurring contributions
+ *
+ * @var boolean
+ */
+ public $is_recur;
+ /**
+ * Payment Type: Credit or Debit (deprecated)
+ *
+ * @var int unsigned
+ */
+ public $payment_type;
+ /**
+ * Payment Instrument ID
+ *
+ * @var int unsigned
+ */
+ public $payment_instrument_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_payment_processor_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_payment_processor_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor Type ID') ,
+ 'description' => 'Payment Processor Type ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Payment Processor variable name to be used in code') ,
+ 'description' => 'Payment Processor Name.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Payment Processor Title') ,
+ 'description' => 'Payment Processor Name.',
+ 'maxlength' => 127,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Processor Type Description') ,
+ 'description' => 'Payment Processor Description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor Type Is Active?') ,
+ 'description' => 'Is this processor active?',
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor Type is Default?') ,
+ 'description' => 'Is this processor the default?',
+ ) ,
+ 'user_name_label' => array(
+ 'name' => 'user_name_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label for User Name if used') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'password_label' => array(
+ 'name' => 'password_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label for password') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'signature_label' => array(
+ 'name' => 'signature_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label for Signature') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'subject_label' => array(
+ 'name' => 'subject_label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label for Subject') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'class_name' => array(
+ 'name' => 'class_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Suffix for PHP class name implementation') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_site_default' => array(
+ 'name' => 'url_site_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Live Site URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_api_default' => array(
+ 'name' => 'url_api_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default API Site URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_recur_default' => array(
+ 'name' => 'url_recur_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Live Recurring Payments URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_button_default' => array(
+ 'name' => 'url_button_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Live Button URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_site_test_default' => array(
+ 'name' => 'url_site_test_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Test Site URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_api_test_default' => array(
+ 'name' => 'url_api_test_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Test API URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_recur_test_default' => array(
+ 'name' => 'url_recur_test_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Test Recurring Payment URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'url_button_test_default' => array(
+ 'name' => 'url_button_test_default',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Default Test Button URL') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'billing_mode' => array(
+ 'name' => 'billing_mode',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Billing Mode') ,
+ 'description' => 'Billing Mode (deprecated)',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::billingMode',
+ )
+ ) ,
+ 'is_recur' => array(
+ 'name' => 'is_recur',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Processor Type Supports Recurring?') ,
+ 'description' => 'Can process recurring contributions',
+ ) ,
+ 'payment_type' => array(
+ 'name' => 'payment_type',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Processor Type Payment Type') ,
+ 'description' => 'Payment Type: Credit or Debit (deprecated)',
+ 'default' => '1',
+ ) ,
+ 'payment_instrument_id' => array(
+ 'name' => 'payment_instrument_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Method') ,
+ 'description' => 'Payment Instrument ID',
+ 'default' => '1',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'payment_instrument',
+ 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'description' => 'description',
+ 'is_active' => 'is_active',
+ 'is_default' => 'is_default',
+ 'user_name_label' => 'user_name_label',
+ 'password_label' => 'password_label',
+ 'signature_label' => 'signature_label',
+ 'subject_label' => 'subject_label',
+ 'class_name' => 'class_name',
+ 'url_site_default' => 'url_site_default',
+ 'url_api_default' => 'url_api_default',
+ 'url_recur_default' => 'url_recur_default',
+ 'url_button_default' => 'url_button_default',
+ 'url_site_test_default' => 'url_site_test_default',
+ 'url_api_test_default' => 'url_api_test_default',
+ 'url_recur_test_default' => 'url_recur_test_default',
+ 'url_button_test_default' => 'url_button_test_default',
+ 'billing_mode' => 'billing_mode',
+ 'is_recur' => 'is_recur',
+ 'payment_type' => 'payment_type',
+ 'payment_instrument_id' => 'payment_instrument_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['payment_processor_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['payment_processor_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Financial/PaymentToken.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c605ea3935d538529bef1182880026ff)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Financial_DAO_PaymentToken extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_payment_token';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Payment Token ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID for the owner of the token
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $payment_processor_id;
+ /**
+ * Externally provided token string
+ *
+ * @var string
+ */
+ public $token;
+ /**
+ * Date created
+ *
+ * @var timestamp
+ */
+ public $created_date;
+ /**
+ * Contact ID of token creator
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date this token expires
+ *
+ * @var datetime
+ */
+ public $expiry_date;
+ /**
+ * Email at the time of token creation. Useful for fraud forensics
+ *
+ * @var string
+ */
+ public $email;
+ /**
+ * Billing first name at the time of token creation. Useful for fraud forensics
+ *
+ * @var string
+ */
+ public $billing_first_name;
+ /**
+ * Billing middle name at the time of token creation. Useful for fraud forensics
+ *
+ * @var string
+ */
+ public $billing_middle_name;
+ /**
+ * Billing last name at the time of token creation. Useful for fraud forensics
+ *
+ * @var string
+ */
+ public $billing_last_name;
+ /**
+ * Holds the part of the card number or account details that may be retained or displayed
+ *
+ * @var string
+ */
+ public $masked_account_number;
+ /**
+ * IP used when creating the token. Useful for fraud forensics
+ *
+ * @var string
+ */
+ public $ip_address;
+ /**
+ * class constructor
+ *
+ * @return civicrm_payment_token
+ */
+ function __construct() {
+ $this->__table = 'civicrm_payment_token';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_id', 'civicrm_payment_processor', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'payment_token_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Token ID') ,
+ 'description' => 'Payment Token ID',
+ 'required' => true,
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID for the owner of the token',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'payment_processor_id' => array(
+ 'name' => 'payment_processor_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Processor ID') ,
+ 'required' => true,
+ 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessor',
+ ) ,
+ 'token' => array(
+ 'name' => 'token',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Token') ,
+ 'description' => 'Externally provided token string',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_TIMESTAMP,
+ 'title' => ts('Created Date') ,
+ 'description' => 'Date created',
+ 'default' => 'CURRENT_TIMESTAMP',
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Created ID') ,
+ 'description' => 'Contact ID of token creator',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'expiry_date' => array(
+ 'name' => 'expiry_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Expiry Date') ,
+ 'description' => 'Date this token expires',
+ ) ,
+ 'email' => array(
+ 'name' => 'email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Email') ,
+ 'description' => 'Email at the time of token creation. Useful for fraud forensics',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'billing_first_name' => array(
+ 'name' => 'billing_first_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Billing First Name') ,
+ 'description' => 'Billing first name at the time of token creation. Useful for fraud forensics',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'billing_middle_name' => array(
+ 'name' => 'billing_middle_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Billing Middle Name') ,
+ 'description' => 'Billing middle name at the time of token creation. Useful for fraud forensics',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'billing_last_name' => array(
+ 'name' => 'billing_last_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Billing Last Name') ,
+ 'description' => 'Billing last name at the time of token creation. Useful for fraud forensics',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'masked_account_number' => array(
+ 'name' => 'masked_account_number',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Masked Account Number') ,
+ 'description' => 'Holds the part of the card number or account details that may be retained or displayed',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'ip_address' => array(
+ 'name' => 'ip_address',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('IP Address') ,
+ 'description' => 'IP used when creating the token. Useful for fraud forensics',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'payment_token_id',
+ 'contact_id' => 'contact_id',
+ 'payment_processor_id' => 'payment_processor_id',
+ 'token' => 'token',
+ 'created_date' => 'created_date',
+ 'created_id' => 'created_id',
+ 'expiry_date' => 'expiry_date',
+ 'email' => 'email',
+ 'billing_first_name' => 'billing_first_name',
+ 'billing_middle_name' => 'billing_middle_name',
+ 'billing_last_name' => 'billing_last_name',
+ 'masked_account_number' => 'masked_account_number',
+ 'ip_address' => 'ip_address',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['payment_token'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['payment_token'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Friend/Friend.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:a4644e3a31c87da3c038fb840579e48b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Friend_DAO_Friend extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_tell_friend';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Friend ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of table where item being referenced is stored.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Introductory message to contributor or participant displayed on the Tell a Friend form.
+ *
+ * @var text
+ */
+ public $intro;
+ /**
+ * Suggested message to friends, provided as default on the Tell A Friend form.
+ *
+ * @var text
+ */
+ public $suggested_message;
+ /**
+ * URL for general info about the organization - included in the email sent to friends.
+ *
+ * @var string
+ */
+ public $general_link;
+ /**
+ * Text for Tell a Friend thank you page header and HTML title.
+ *
+ * @var string
+ */
+ public $thankyou_title;
+ /**
+ * Thank you message displayed on success page.
+ *
+ * @var text
+ */
+ public $thankyou_text;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_tell_friend
+ */
+ function __construct() {
+ $this->__table = 'civicrm_tell_friend';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Friend ID') ,
+ 'description' => 'Friend ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Name of table where item being referenced is stored.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity ID') ,
+ 'description' => 'Foreign key to the referenced item.',
+ 'required' => true,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Title') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'intro' => array(
+ 'name' => 'intro',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Intro') ,
+ 'description' => 'Introductory message to contributor or participant displayed on the Tell a Friend form.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'suggested_message' => array(
+ 'name' => 'suggested_message',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Suggested Message') ,
+ 'description' => 'Suggested message to friends, provided as default on the Tell A Friend form.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'general_link' => array(
+ 'name' => 'general_link',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('General Link') ,
+ 'description' => 'URL for general info about the organization - included in the email sent to friends.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_tell_friend.general_link',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'thankyou_title' => array(
+ 'name' => 'thankyou_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Thank You Title') ,
+ 'description' => 'Text for Tell a Friend thank you page header and HTML title.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'thankyou_text' => array(
+ 'name' => 'thankyou_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Thank You Text') ,
+ 'description' => 'Thank you message displayed on success page.',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Enabled?') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'title' => 'title',
+ 'intro' => 'intro',
+ 'suggested_message' => 'suggested_message',
+ 'general_link' => 'general_link',
+ 'thankyou_title' => 'thankyou_title',
+ 'thankyou_text' => 'thankyou_text',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['tell_friend'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['tell_friend'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Grant/Grant.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:9cc730aa3d83bea4d358dca0f53991c5)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Grant_DAO_Grant extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_grant';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Unique Grant id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Contact ID of contact record given grant belongs to.
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Date on which grant application was received by donor.
+ *
+ * @var date
+ */
+ public $application_received_date;
+ /**
+ * Date on which grant decision was made.
+ *
+ * @var date
+ */
+ public $decision_date;
+ /**
+ * Date on which grant money transfer was made.
+ *
+ * @var date
+ */
+ public $money_transfer_date;
+ /**
+ * Date on which grant report is due.
+ *
+ * @var date
+ */
+ public $grant_due_date;
+ /**
+ * Yes/No field stating whether grant report was received by donor.
+ *
+ * @var boolean
+ */
+ public $grant_report_received;
+ /**
+ * Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.
+ *
+ * @var int unsigned
+ */
+ public $grant_type_id;
+ /**
+ * Requested grant amount, in default currency.
+ *
+ * @var float
+ */
+ public $amount_total;
+ /**
+ * Requested grant amount, in original currency (optional).
+ *
+ * @var float
+ */
+ public $amount_requested;
+ /**
+ * Granted amount, in default currency.
+ *
+ * @var float
+ */
+ public $amount_granted;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * Grant rationale.
+ *
+ * @var text
+ */
+ public $rationale;
+ /**
+ * Id of Grant status.
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * FK to Financial Type.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_grant
+ */
+ function __construct() {
+ $this->__table = 'civicrm_grant';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'grant_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Grant ID') ,
+ 'description' => 'Unique Grant id',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_grant.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'grant_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Contact ID of contact record given grant belongs to.',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_grant.contact_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'application_received_date' => array(
+ 'name' => 'application_received_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Application received date') ,
+ 'description' => 'Date on which grant application was received by donor.',
+ 'export' => true,
+ 'where' => 'civicrm_grant.application_received_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ ) ,
+ 'decision_date' => array(
+ 'name' => 'decision_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Decision date') ,
+ 'description' => 'Date on which grant decision was made.',
+ 'import' => true,
+ 'where' => 'civicrm_grant.decision_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'grant_money_transfer_date' => array(
+ 'name' => 'money_transfer_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Grant Money transfer date') ,
+ 'description' => 'Date on which grant money transfer was made.',
+ 'import' => true,
+ 'where' => 'civicrm_grant.money_transfer_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'grant_due_date' => array(
+ 'name' => 'grant_due_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Grant Due Date') ,
+ 'description' => 'Date on which grant report is due.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'grant_report_received' => array(
+ 'name' => 'grant_report_received',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Grant report received') ,
+ 'description' => 'Yes/No field stating whether grant report was received by donor.',
+ 'import' => true,
+ 'where' => 'civicrm_grant.grant_report_received',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'grant_type_id' => array(
+ 'name' => 'grant_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Grant Type') ,
+ 'description' => 'Type of grant. Implicit FK to civicrm_option_value in grant_type option_group.',
+ 'required' => true,
+ 'export' => true,
+ 'where' => 'civicrm_grant.grant_type_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'grant_type',
+ 'optionEditPath' => 'civicrm/admin/options/grant_type',
+ )
+ ) ,
+ 'amount_total' => array(
+ 'name' => 'amount_total',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Total Amount') ,
+ 'description' => 'Requested grant amount, in default currency.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_grant.amount_total',
+ 'headerPattern' => '',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'amount_requested' => array(
+ 'name' => 'amount_requested',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Amount Requested') ,
+ 'description' => 'Requested grant amount, in original currency (optional).',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'amount_granted' => array(
+ 'name' => 'amount_granted',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Amount granted') ,
+ 'description' => 'Granted amount, in default currency.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_grant.amount_granted',
+ 'headerPattern' => '',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Grant Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'required' => true,
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'rationale' => array(
+ 'name' => 'rationale',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Grant Rationale') ,
+ 'description' => 'Grant rationale.',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'import' => true,
+ 'where' => 'civicrm_grant.rationale',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'grant_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Grant Status') ,
+ 'description' => 'Id of Grant status.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_grant.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'grant_status',
+ 'optionEditPath' => 'civicrm/admin/options/grant_status',
+ )
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'grant_id',
+ 'contact_id' => 'grant_contact_id',
+ 'application_received_date' => 'application_received_date',
+ 'decision_date' => 'decision_date',
+ 'money_transfer_date' => 'grant_money_transfer_date',
+ 'grant_due_date' => 'grant_due_date',
+ 'grant_report_received' => 'grant_report_received',
+ 'grant_type_id' => 'grant_type_id',
+ 'amount_total' => 'amount_total',
+ 'amount_requested' => 'amount_requested',
+ 'amount_granted' => 'amount_granted',
+ 'currency' => 'currency',
+ 'rationale' => 'rationale',
+ 'status_id' => 'grant_status_id',
+ 'financial_type_id' => 'financial_type_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['grant'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['grant'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/BouncePattern.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:f720000f9137bac1c9c0f1385757c2bf)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_BouncePattern extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_bounce_pattern';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Type of bounce
+ *
+ * @var int unsigned
+ */
+ public $bounce_type_id;
+ /**
+ * A regexp to match a message to a bounce type
+ *
+ * @var string
+ */
+ public $pattern;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_bounce_pattern
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_bounce_pattern';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'bounce_type_id', 'civicrm_mailing_bounce_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Bounce Pattern ID') ,
+ 'required' => true,
+ ) ,
+ 'bounce_type_id' => array(
+ 'name' => 'bounce_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Bounce Type') ,
+ 'description' => 'Type of bounce',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_BounceType',
+ ) ,
+ 'pattern' => array(
+ 'name' => 'pattern',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Pattern') ,
+ 'description' => 'A regexp to match a message to a bounce type',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'bounce_type_id' => 'bounce_type_id',
+ 'pattern' => 'pattern',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_bounce_pattern'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_bounce_pattern'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/BounceType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:16c6c4967007e82fc4501a4ee82b9ff3)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_BounceType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_bounce_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Type of bounce
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * A description of this bounce type
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Number of bounces of this type required before the email address is put on bounce hold
+ *
+ * @var int unsigned
+ */
+ public $hold_threshold;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_bounce_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_bounce_type';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Bounce Type ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Bounce Type Name') ,
+ 'description' => 'Type of bounce',
+ 'required' => true,
+ 'maxlength' => 24,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Bounce Type Description') ,
+ 'description' => 'A description of this bounce type',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'hold_threshold' => array(
+ 'name' => 'hold_threshold',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Hold Threshold') ,
+ 'description' => 'Number of bounces of this type required before the email address is put on bounce hold',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'description' => 'description',
+ 'hold_threshold' => 'hold_threshold',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_bounce_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_bounce_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Component.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0c2758af15960d2d2d690d9d66e001c8)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_Component extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_component';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The name of this component
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Type of Component.
+ *
+ * @var string
+ */
+ public $component_type;
+ /**
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Body of the component in html format.
+ *
+ * @var text
+ */
+ public $body_html;
+ /**
+ * Body of the component in text format.
+ *
+ * @var text
+ */
+ public $body_text;
+ /**
+ * Is this the default component for this component_type?
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Is this property active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_component
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_component';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Component ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Component Name') ,
+ 'description' => 'The name of this component',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'component_type' => array(
+ 'name' => 'component_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Component Type') ,
+ 'description' => 'Type of Component.',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::mailingComponents',
+ )
+ ) ,
+ 'subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Subject') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'body_html' => array(
+ 'name' => 'body_html',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Mailing Component Body HTML') ,
+ 'description' => 'Body of the component in html format.',
+ 'rows' => 8,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'body_text' => array(
+ 'name' => 'body_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Body Text') ,
+ 'description' => 'Body of the component in text format.',
+ 'rows' => 8,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Mailing Component is Default?') ,
+ 'description' => 'Is this the default component for this component_type?',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Mailing Component Is Active?') ,
+ 'description' => 'Is this property active?',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'component_type' => 'component_type',
+ 'subject' => 'subject',
+ 'body_html' => 'body_html',
+ 'body_text' => 'body_text',
+ 'is_default' => 'is_default',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_component'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_component'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Mailing.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c0b169afbdb126cf84f7347036439f98)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_Mailing extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which site is this mailing for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * FK to the header component.
+ *
+ * @var int unsigned
+ */
+ public $header_id;
+ /**
+ * FK to the footer component.
+ *
+ * @var int unsigned
+ */
+ public $footer_id;
+ /**
+ * FK to the auto-responder component.
+ *
+ * @var int unsigned
+ */
+ public $reply_id;
+ /**
+ * FK to the unsubscribe component.
+ *
+ * @var int unsigned
+ */
+ public $unsubscribe_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $resubscribe_id;
+ /**
+ * FK to the opt-out component.
+ *
+ * @var int unsigned
+ */
+ public $optout_id;
+ /**
+ * Mailing Name.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * differentiate between standalone mailings, A/B tests, and A/B final-winner
+ *
+ * @var string
+ */
+ public $mailing_type;
+ /**
+ * From Header of mailing
+ *
+ * @var string
+ */
+ public $from_name;
+ /**
+ * From Email of mailing
+ *
+ * @var string
+ */
+ public $from_email;
+ /**
+ * Reply-To Email of mailing
+ *
+ * @var string
+ */
+ public $replyto_email;
+ /**
+ * Subject of mailing
+ *
+ * @var string
+ */
+ public $subject;
+ /**
+ * Body of the mailing in text format.
+ *
+ * @var longtext
+ */
+ public $body_text;
+ /**
+ * Body of the mailing in html format.
+ *
+ * @var longtext
+ */
+ public $body_html;
+ /**
+ * Should we track URL click-throughs for this mailing?
+ *
+ * @var boolean
+ */
+ public $url_tracking;
+ /**
+ * Should we forward replies back to the author?
+ *
+ * @var boolean
+ */
+ public $forward_replies;
+ /**
+ * Should we enable the auto-responder?
+ *
+ * @var boolean
+ */
+ public $auto_responder;
+ /**
+ * Should we track when recipients open/read this mailing?
+ *
+ * @var boolean
+ */
+ public $open_tracking;
+ /**
+ * Has at least one job associated with this mailing finished?
+ *
+ * @var boolean
+ */
+ public $is_completed;
+ /**
+ * FK to the message template.
+ *
+ * @var int unsigned
+ */
+ public $msg_template_id;
+ /**
+ * Should we overrite VERP address in Reply-To
+ *
+ * @var boolean
+ */
+ public $override_verp;
+ /**
+ * FK to Contact ID who first created this mailing
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * Date and time this mailing was created.
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * FK to Contact ID who scheduled this mailing
+ *
+ * @var int unsigned
+ */
+ public $scheduled_id;
+ /**
+ * Date and time this mailing was scheduled.
+ *
+ * @var datetime
+ */
+ public $scheduled_date;
+ /**
+ * FK to Contact ID who approved this mailing
+ *
+ * @var int unsigned
+ */
+ public $approver_id;
+ /**
+ * Date and time this mailing was approved.
+ *
+ * @var datetime
+ */
+ public $approval_date;
+ /**
+ * The status of this mailing. Values: none, approved, rejected
+ *
+ * @var int unsigned
+ */
+ public $approval_status_id;
+ /**
+ * Note behind the decision.
+ *
+ * @var longtext
+ */
+ public $approval_note;
+ /**
+ * Is this mailing archived?
+ *
+ * @var boolean
+ */
+ public $is_archived;
+ /**
+ * In what context(s) is the mailing contents visible (online viewing)
+ *
+ * @var string
+ */
+ public $visibility;
+ /**
+ * The campaign for which this mailing has been initiated.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * Remove duplicate emails?
+ *
+ * @var boolean
+ */
+ public $dedupe_email;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $sms_provider_id;
+ /**
+ * Key for validating requests related to this mailing.
+ *
+ * @var string
+ */
+ public $hash;
+ /**
+ * With email_selection_method, determines which email address to use
+ *
+ * @var int unsigned
+ */
+ public $location_type_id;
+ /**
+ * With location_type_id, determine how to choose the email address to use.
+ *
+ * @var string
+ */
+ public $email_selection_method;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'header_id', 'civicrm_mailing_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'footer_id', 'civicrm_mailing_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'reply_id', 'civicrm_mailing_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'unsubscribe_id', 'civicrm_mailing_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'optout_id', 'civicrm_mailing_component', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'msg_template_id', 'civicrm_msg_template', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'scheduled_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'approver_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'sms_provider_id', 'civicrm_sms_provider', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'location_type_id', 'civicrm_location_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing ID') ,
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Domain') ,
+ 'description' => 'Which site is this mailing for',
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'header_id' => array(
+ 'name' => 'header_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Header') ,
+ 'description' => 'FK to the header component.',
+ 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ ) ,
+ 'footer_id' => array(
+ 'name' => 'footer_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Footer') ,
+ 'description' => 'FK to the footer component.',
+ 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ ) ,
+ 'reply_id' => array(
+ 'name' => 'reply_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Reply') ,
+ 'description' => 'FK to the auto-responder component.',
+ 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ ) ,
+ 'unsubscribe_id' => array(
+ 'name' => 'unsubscribe_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Unsubscribe') ,
+ 'description' => 'FK to the unsubscribe component.',
+ 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ ) ,
+ 'resubscribe_id' => array(
+ 'name' => 'resubscribe_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Resubscribe') ,
+ ) ,
+ 'optout_id' => array(
+ 'name' => 'optout_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Opt Out') ,
+ 'description' => 'FK to the opt-out component.',
+ 'FKClassName' => 'CRM_Mailing_DAO_Component',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Name') ,
+ 'description' => 'Mailing Name.',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'mailing_type' => array(
+ 'name' => 'mailing_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Type') ,
+ 'description' => 'differentiate between standalone mailings, A/B tests, and A/B final-winner',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Mailing_PseudoConstant::mailingTypes',
+ )
+ ) ,
+ 'from_name' => array(
+ 'name' => 'from_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing From Name') ,
+ 'description' => 'From Header of mailing',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'from_email' => array(
+ 'name' => 'from_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing From Email') ,
+ 'description' => 'From Email of mailing',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'replyto_email' => array(
+ 'name' => 'replyto_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Replyto Email') ,
+ 'description' => 'Reply-To Email of mailing',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'subject' => array(
+ 'name' => 'subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Subject') ,
+ 'description' => 'Subject of mailing',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'body_text' => array(
+ 'name' => 'body_text',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Body Text') ,
+ 'description' => 'Body of the mailing in text format.',
+ ) ,
+ 'body_html' => array(
+ 'name' => 'body_html',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Body Html') ,
+ 'description' => 'Body of the mailing in html format.',
+ ) ,
+ 'url_tracking' => array(
+ 'name' => 'url_tracking',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Url Tracking') ,
+ 'description' => 'Should we track URL click-throughs for this mailing?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'forward_replies' => array(
+ 'name' => 'forward_replies',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Forward Replies') ,
+ 'description' => 'Should we forward replies back to the author?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'auto_responder' => array(
+ 'name' => 'auto_responder',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Auto Responder') ,
+ 'description' => 'Should we enable the auto-responder?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'open_tracking' => array(
+ 'name' => 'open_tracking',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Track Mailing?') ,
+ 'description' => 'Should we track when recipients open/read this mailing?',
+ ) ,
+ 'is_completed' => array(
+ 'name' => 'is_completed',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Mailing Completed') ,
+ 'description' => 'Has at least one job associated with this mailing finished?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'msg_template_id' => array(
+ 'name' => 'msg_template_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Message Template') ,
+ 'description' => 'FK to the message template.',
+ 'FKClassName' => 'CRM_Core_DAO_MessageTemplate',
+ ) ,
+ 'override_verp' => array(
+ 'name' => 'override_verp',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Override Verp') ,
+ 'description' => 'Should we overrite VERP address in Reply-To',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Creator') ,
+ 'description' => 'FK to Contact ID who first created this mailing',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Created Date') ,
+ 'description' => 'Date and time this mailing was created.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'scheduled_id' => array(
+ 'name' => 'scheduled_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Scheduled By') ,
+ 'description' => 'FK to Contact ID who scheduled this mailing',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'scheduled_date' => array(
+ 'name' => 'scheduled_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Scheduled Date') ,
+ 'description' => 'Date and time this mailing was scheduled.',
+ ) ,
+ 'approver_id' => array(
+ 'name' => 'approver_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Approved By') ,
+ 'description' => 'FK to Contact ID who approved this mailing',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'approval_date' => array(
+ 'name' => 'approval_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Approved Date') ,
+ 'description' => 'Date and time this mailing was approved.',
+ ) ,
+ 'approval_status_id' => array(
+ 'name' => 'approval_status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Approval Status') ,
+ 'description' => 'The status of this mailing. Values: none, approved, rejected',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'mail_approval_status',
+ 'optionEditPath' => 'civicrm/admin/options/mail_approval_status',
+ )
+ ) ,
+ 'approval_note' => array(
+ 'name' => 'approval_note',
+ 'type' => CRM_Utils_Type::T_LONGTEXT,
+ 'title' => ts('Approval Note') ,
+ 'description' => 'Note behind the decision.',
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'is_archived' => array(
+ 'name' => 'is_archived',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Mailing Archived?') ,
+ 'description' => 'Is this mailing archived?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'visibility' => array(
+ 'name' => 'visibility',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Visibility') ,
+ 'description' => 'In what context(s) is the mailing contents visible (online viewing)',
+ 'maxlength' => 40,
+ 'size' => CRM_Utils_Type::BIG,
+ 'default' => 'Public Pages',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::groupVisibility',
+ )
+ ) ,
+ 'campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Campaign') ,
+ 'description' => 'The campaign for which this mailing has been initiated.',
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'dedupe_email' => array(
+ 'name' => 'dedupe_email',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('No Duplicate emails?') ,
+ 'description' => 'Remove duplicate emails?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'sms_provider_id' => array(
+ 'name' => 'sms_provider_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing SMS Provider') ,
+ 'FKClassName' => 'CRM_SMS_DAO_Provider',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'hash' => array(
+ 'name' => 'hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Hash') ,
+ 'description' => 'Key for validating requests related to this mailing.',
+ 'maxlength' => 16,
+ 'size' => CRM_Utils_Type::TWELVE,
+ ) ,
+ 'location_type_id' => array(
+ 'name' => 'location_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Location Type') ,
+ 'description' => 'With email_selection_method, determines which email address to use',
+ 'FKClassName' => 'CRM_Core_DAO_LocationType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_location_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'display_name',
+ )
+ ) ,
+ 'email_selection_method' => array(
+ 'name' => 'email_selection_method',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Email Selection Method') ,
+ 'description' => 'With location_type_id, determine how to choose the email address to use.',
+ 'maxlength' => 20,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'default' => 'automatic',
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::emailSelectMethods',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'header_id' => 'header_id',
+ 'footer_id' => 'footer_id',
+ 'reply_id' => 'reply_id',
+ 'unsubscribe_id' => 'unsubscribe_id',
+ 'resubscribe_id' => 'resubscribe_id',
+ 'optout_id' => 'optout_id',
+ 'name' => 'name',
+ 'mailing_type' => 'mailing_type',
+ 'from_name' => 'from_name',
+ 'from_email' => 'from_email',
+ 'replyto_email' => 'replyto_email',
+ 'subject' => 'subject',
+ 'body_text' => 'body_text',
+ 'body_html' => 'body_html',
+ 'url_tracking' => 'url_tracking',
+ 'forward_replies' => 'forward_replies',
+ 'auto_responder' => 'auto_responder',
+ 'open_tracking' => 'open_tracking',
+ 'is_completed' => 'is_completed',
+ 'msg_template_id' => 'msg_template_id',
+ 'override_verp' => 'override_verp',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ 'scheduled_id' => 'scheduled_id',
+ 'scheduled_date' => 'scheduled_date',
+ 'approver_id' => 'approver_id',
+ 'approval_date' => 'approval_date',
+ 'approval_status_id' => 'approval_status_id',
+ 'approval_note' => 'approval_note',
+ 'is_archived' => 'is_archived',
+ 'visibility' => 'visibility',
+ 'campaign_id' => 'campaign_id',
+ 'dedupe_email' => 'dedupe_email',
+ 'sms_provider_id' => 'sms_provider_id',
+ 'hash' => 'hash',
+ 'location_type_id' => 'location_type_id',
+ 'email_selection_method' => 'email_selection_method',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/MailingAB.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7b7f8b44677dbb57b3c4719e19c4d7ba)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_MailingAB extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_abtest';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the A/B test
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Status
+ *
+ * @var string
+ */
+ public $status;
+ /**
+ * The first experimental mailing ("A" condition)
+ *
+ * @var int unsigned
+ */
+ public $mailing_id_a;
+ /**
+ * The second experimental mailing ("B" condition)
+ *
+ * @var int unsigned
+ */
+ public $mailing_id_b;
+ /**
+ * The final, general mailing (derived from A or B)
+ *
+ * @var int unsigned
+ */
+ public $mailing_id_c;
+ /**
+ * Which site is this mailing for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ *
+ * @var string
+ */
+ public $testing_criteria;
+ /**
+ *
+ * @var string
+ */
+ public $winner_criteria;
+ /**
+ * What specific url to track
+ *
+ * @var string
+ */
+ public $specific_url;
+ /**
+ * In how much time to declare winner
+ *
+ * @var datetime
+ */
+ public $declare_winning_time;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $group_percentage;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * When was this item created
+ *
+ * @var datetime
+ */
+ public $created_date;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_abtest
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_abtest';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('MailingAB ID') ,
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Name of the A/B test',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'status' => array(
+ 'name' => 'status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Status') ,
+ 'description' => 'Status',
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Mailing_PseudoConstant::abStatus',
+ )
+ ) ,
+ 'mailing_id_a' => array(
+ 'name' => 'mailing_id_a',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing ID (A)') ,
+ 'description' => 'The first experimental mailing ("A" condition)',
+ ) ,
+ 'mailing_id_b' => array(
+ 'name' => 'mailing_id_b',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing ID (B)') ,
+ 'description' => 'The second experimental mailing ("B" condition)',
+ ) ,
+ 'mailing_id_c' => array(
+ 'name' => 'mailing_id_c',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing ID (C)') ,
+ 'description' => 'The final, general mailing (derived from A or B)',
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Domain ID') ,
+ 'description' => 'Which site is this mailing for',
+ ) ,
+ 'testing_criteria' => array(
+ 'name' => 'testing_criteria',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Testing Criteria') ,
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Mailing_PseudoConstant::abTestCriteria',
+ )
+ ) ,
+ 'winner_criteria' => array(
+ 'name' => 'winner_criteria',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Winner Criteria') ,
+ 'maxlength' => 32,
+ 'size' => CRM_Utils_Type::MEDIUM,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Mailing_PseudoConstant::abWinnerCriteria',
+ )
+ ) ,
+ 'specific_url' => array(
+ 'name' => 'specific_url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('URL for Winner Criteria') ,
+ 'description' => 'What specific url to track',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'declare_winning_time' => array(
+ 'name' => 'declare_winning_time',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Declaration Time') ,
+ 'description' => 'In how much time to declare winner',
+ ) ,
+ 'group_percentage' => array(
+ 'name' => 'group_percentage',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Group Percentage') ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('AB Test Created By') ,
+ 'description' => 'FK to Contact ID',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'created_date' => array(
+ 'name' => 'created_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('AB Test Created Date') ,
+ 'description' => 'When was this item created',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'status' => 'status',
+ 'mailing_id_a' => 'mailing_id_a',
+ 'mailing_id_b' => 'mailing_id_b',
+ 'mailing_id_c' => 'mailing_id_c',
+ 'domain_id' => 'domain_id',
+ 'testing_criteria' => 'testing_criteria',
+ 'winner_criteria' => 'winner_criteria',
+ 'specific_url' => 'specific_url',
+ 'declare_winning_time' => 'declare_winning_time',
+ 'group_percentage' => 'group_percentage',
+ 'created_id' => 'created_id',
+ 'created_date' => 'created_date',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_abtest'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_abtest'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/MailingGroup.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:ea827d76e72e9ba462bdae6aea66e665)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_MailingGroup extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_group';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The ID of a previous mailing to include/exclude recipients.
+ *
+ * @var int unsigned
+ */
+ public $mailing_id;
+ /**
+ * Are the members of the group included or excluded?.
+ *
+ * @var string
+ */
+ public $group_type;
+ /**
+ * Name of table where item being referenced is stored.
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Foreign key to the referenced item.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * The filtering search. custom search id or -1 for civicrm api search
+ *
+ * @var int
+ */
+ public $search_id;
+ /**
+ * The arguments to be sent to the search function
+ *
+ * @var text
+ */
+ public $search_args;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_group
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_group';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Group ID') ,
+ 'required' => true,
+ ) ,
+ 'mailing_id' => array(
+ 'name' => 'mailing_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing') ,
+ 'description' => 'The ID of a previous mailing to include/exclude recipients.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
+ ) ,
+ 'group_type' => array(
+ 'name' => 'group_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Group Type') ,
+ 'description' => 'Are the members of the group included or excluded?.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getMailingGroupTypes',
+ )
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Group Entity Table') ,
+ 'description' => 'Name of table where item being referenced is stored.',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Mailing_BAO_Mailing::mailingGroupEntityTables',
+ )
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Group Entity') ,
+ 'description' => 'Foreign key to the referenced item.',
+ 'required' => true,
+ ) ,
+ 'search_id' => array(
+ 'name' => 'search_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Group Search') ,
+ 'description' => 'The filtering search. custom search id or -1 for civicrm api search',
+ ) ,
+ 'search_args' => array(
+ 'name' => 'search_args',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Mailing Group Search Arguments') ,
+ 'description' => 'The arguments to be sent to the search function',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'mailing_id' => 'mailing_id',
+ 'group_type' => 'group_type',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'search_id' => 'search_id',
+ 'search_args' => 'search_args',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_group'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_group'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/MailingJob.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b41e4d5e6541acff6328ece968e45b2d)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_MailingJob extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_job';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The ID of the mailing this Job will send.
+ *
+ * @var int unsigned
+ */
+ public $mailing_id;
+ /**
+ * date on which this job was scheduled.
+ *
+ * @var datetime
+ */
+ public $scheduled_date;
+ /**
+ * date on which this job was started.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * date on which this job ended.
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * The state of this job
+ *
+ * @var string
+ */
+ public $status;
+ /**
+ * Is this job for a test mail?
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ * Type of mailling job: null | child
+ *
+ * @var string
+ */
+ public $job_type;
+ /**
+ * Parent job id
+ *
+ * @var int unsigned
+ */
+ public $parent_id;
+ /**
+ * Offset of the child job
+ *
+ * @var int
+ */
+ public $job_offset;
+ /**
+ * Queue size limit for each child job
+ *
+ * @var int
+ */
+ public $job_limit;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_job
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_job';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'parent_id', 'civicrm_mailing_job', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Job ID') ,
+ 'required' => true,
+ ) ,
+ 'mailing_id' => array(
+ 'name' => 'mailing_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing') ,
+ 'description' => 'The ID of the mailing this Job will send.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
+ ) ,
+ 'scheduled_date' => array(
+ 'name' => 'scheduled_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Scheduled Date') ,
+ 'description' => 'date on which this job was scheduled.',
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Job Start Date') ,
+ 'description' => 'date on which this job was started.',
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Job End Date') ,
+ 'description' => 'date on which this job ended.',
+ ) ,
+ 'status' => array(
+ 'name' => 'status',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Job Status') ,
+ 'description' => 'The state of this job',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::getMailingJobStatus',
+ )
+ ) ,
+ 'is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Mailing Job Is Test?') ,
+ 'description' => 'Is this job for a test mail?',
+ ) ,
+ 'job_type' => array(
+ 'name' => 'job_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Job Type') ,
+ 'description' => 'Type of mailling job: null | child ',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'parent_id' => array(
+ 'name' => 'parent_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Job Parent') ,
+ 'description' => 'Parent job id',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
+ ) ,
+ 'job_offset' => array(
+ 'name' => 'job_offset',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Job Offset') ,
+ 'description' => 'Offset of the child job',
+ ) ,
+ 'job_limit' => array(
+ 'name' => 'job_limit',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Job Limit') ,
+ 'description' => 'Queue size limit for each child job',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'mailing_id' => 'mailing_id',
+ 'scheduled_date' => 'scheduled_date',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ 'status' => 'status',
+ 'is_test' => 'is_test',
+ 'job_type' => 'job_type',
+ 'parent_id' => 'parent_id',
+ 'job_offset' => 'job_offset',
+ 'job_limit' => 'job_limit',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_job'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_job'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Recipients.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7186783b32725a9ba0fd6b6ea995a69a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_Recipients extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_recipients';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The ID of the mailing this Job will send.
+ *
+ * @var int unsigned
+ */
+ public $mailing_id;
+ /**
+ * FK to Contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to Email
+ *
+ * @var int unsigned
+ */
+ public $email_id;
+ /**
+ * FK to Phone
+ *
+ * @var int unsigned
+ */
+ public $phone_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_recipients
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_recipients';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'email_id', 'civicrm_email', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'phone_id', 'civicrm_phone', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Recipients ID') ,
+ 'required' => true,
+ ) ,
+ 'mailing_id' => array(
+ 'name' => 'mailing_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing') ,
+ 'description' => 'The ID of the mailing this Job will send.',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Recipient') ,
+ 'description' => 'FK to Contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'email_id' => array(
+ 'name' => 'email_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Recipient Email') ,
+ 'description' => 'FK to Email',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Email',
+ ) ,
+ 'phone_id' => array(
+ 'name' => 'phone_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Recipient Phone') ,
+ 'description' => 'FK to Phone',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Phone',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'mailing_id' => 'mailing_id',
+ 'contact_id' => 'contact_id',
+ 'email_id' => 'email_id',
+ 'phone_id' => 'phone_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_recipients'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_recipients'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Spool.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:6340e9403571f259582b22205205c6de)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_Spool extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_spool';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The ID of the Job .
+ *
+ * @var int unsigned
+ */
+ public $job_id;
+ /**
+ * The email of the receipients this mail is to be sent.
+ *
+ * @var text
+ */
+ public $recipient_email;
+ /**
+ * The header information of this mailing .
+ *
+ * @var text
+ */
+ public $headers;
+ /**
+ * The body of this mailing.
+ *
+ * @var text
+ */
+ public $body;
+ /**
+ * date on which this job was added.
+ *
+ * @var datetime
+ */
+ public $added_at;
+ /**
+ * date on which this job was removed.
+ *
+ * @var datetime
+ */
+ public $removed_at;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_spool
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_spool';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'job_id', 'civicrm_mailing_job', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Spool ID') ,
+ 'required' => true,
+ ) ,
+ 'job_id' => array(
+ 'name' => 'job_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Job') ,
+ 'description' => 'The ID of the Job .',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
+ ) ,
+ 'recipient_email' => array(
+ 'name' => 'recipient_email',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Recipient Email') ,
+ 'description' => 'The email of the receipients this mail is to be sent.',
+ ) ,
+ 'headers' => array(
+ 'name' => 'headers',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Headers') ,
+ 'description' => 'The header information of this mailing .',
+ ) ,
+ 'body' => array(
+ 'name' => 'body',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Body') ,
+ 'description' => 'The body of this mailing.',
+ ) ,
+ 'added_at' => array(
+ 'name' => 'added_at',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Added') ,
+ 'description' => 'date on which this job was added.',
+ ) ,
+ 'removed_at' => array(
+ 'name' => 'removed_at',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Removed') ,
+ 'description' => 'date on which this job was removed.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'job_id' => 'job_id',
+ 'recipient_email' => 'recipient_email',
+ 'headers' => 'headers',
+ 'body' => 'body',
+ 'added_at' => 'added_at',
+ 'removed_at' => 'removed_at',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_spool'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_spool'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/TrackableURL.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:0e7d2b0739d2e786ad5c57975504c647)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_DAO_TrackableURL extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_trackable_url';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * The URL to be tracked.
+ *
+ * @var text
+ */
+ public $url;
+ /**
+ * FK to the mailing
+ *
+ * @var int unsigned
+ */
+ public $mailing_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_trackable_url
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_trackable_url';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'mailing_id', 'civicrm_mailing', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Trackable URL ID') ,
+ 'required' => true,
+ ) ,
+ 'url' => array(
+ 'name' => 'url',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Url') ,
+ 'description' => 'The URL to be tracked.',
+ 'required' => true,
+ ) ,
+ 'mailing_id' => array(
+ 'name' => 'mailing_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing') ,
+ 'description' => 'FK to the mailing',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_Mailing',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'url' => 'url',
+ 'mailing_id' => 'mailing_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_trackable_url'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_trackable_url'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Bounce.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:69f76cd03a5376a4ba729a77487e7eeb)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Bounce extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_bounce';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * What type of bounce was it?
+ *
+ * @var int unsigned
+ */
+ public $bounce_type_id;
+ /**
+ * The reason the email bounced.
+ *
+ * @var string
+ */
+ public $bounce_reason;
+ /**
+ * When this bounce event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_bounce
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_bounce';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Bounce ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'bounce_type_id' => array(
+ 'name' => 'bounce_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Bounce Type') ,
+ 'description' => 'What type of bounce was it?',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_mailing_bounce_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'bounce_reason' => array(
+ 'name' => 'bounce_reason',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Bounce Reason') ,
+ 'description' => 'The reason the email bounced.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'When this bounce event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'bounce_type_id' => 'bounce_type_id',
+ 'bounce_reason' => 'bounce_reason',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_bounce'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_bounce'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Confirm.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:4074720d03b363516bfa7111b1191c30)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Confirm extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_confirm';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_mailing_event_subscribe
+ *
+ * @var int unsigned
+ */
+ public $event_subscribe_id;
+ /**
+ * When this confirmation event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_confirm
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_confirm';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_subscribe_id', 'civicrm_mailing_event_subscribe', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Confirmation ID') ,
+ 'required' => true,
+ ) ,
+ 'event_subscribe_id' => array(
+ 'name' => 'event_subscribe_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Subscribe ID') ,
+ 'description' => 'FK to civicrm_mailing_event_subscribe',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Subscribe',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Confirm Timestamp') ,
+ 'description' => 'When this confirmation event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_subscribe_id' => 'event_subscribe_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_confirm'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_confirm'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Delivered.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:4528b64da3693e39dd1308d872c2ebfa)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Delivered extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_delivered';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * When this delivery event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_delivered
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_delivered';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Delivered ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'When this delivery event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_delivered'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_delivered'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Forward.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b3e0d9ad5251c0a8a67f89e36321ae39)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Forward extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_forward';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * FK to EventQueue for destination
+ *
+ * @var int unsigned
+ */
+ public $dest_queue_id;
+ /**
+ * When this forward event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_forward
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_forward';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'dest_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Forward ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'dest_queue_id' => array(
+ 'name' => 'dest_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Destination Queue') ,
+ 'description' => 'FK to EventQueue for destination',
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'When this forward event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'dest_queue_id' => 'dest_queue_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_forward'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_forward'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Opened.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:cb0540531d35123af48344fd801e62dd)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Opened extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_opened';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * When this open event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_opened
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_opened';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Opened ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'When this open event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_opened'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_opened'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Queue.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:a48ad4ff1c083fe1d57c190f3da18ff2)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Queue extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_queue';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Job
+ *
+ * @var int unsigned
+ */
+ public $job_id;
+ /**
+ * FK to Email
+ *
+ * @var int unsigned
+ */
+ public $email_id;
+ /**
+ * FK to Contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Security hash
+ *
+ * @var string
+ */
+ public $hash;
+ /**
+ * FK to Phone
+ *
+ * @var int unsigned
+ */
+ public $phone_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_queue
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_queue';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'job_id', 'civicrm_mailing_job', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'email_id', 'civicrm_email', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'phone_id', 'civicrm_phone', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Event Queue ID') ,
+ 'required' => true,
+ ) ,
+ 'job_id' => array(
+ 'name' => 'job_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Job ID') ,
+ 'description' => 'FK to Job',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_MailingJob',
+ ) ,
+ 'email_id' => array(
+ 'name' => 'email_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Email ID') ,
+ 'description' => 'FK to Email',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Email',
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'hash' => array(
+ 'name' => 'hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Security Hash') ,
+ 'description' => 'Security hash',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'phone_id' => array(
+ 'name' => 'phone_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Phone ID') ,
+ 'description' => 'FK to Phone',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_Phone',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'job_id' => 'job_id',
+ 'email_id' => 'email_id',
+ 'contact_id' => 'contact_id',
+ 'hash' => 'hash',
+ 'phone_id' => 'phone_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_queue'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_queue'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Reply.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:fe459beb8f37d240ee7675b1a64be024)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Reply extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_reply';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * When this reply event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_reply
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_reply';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Reply ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Reply Timestamp') ,
+ 'description' => 'When this reply event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_reply'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_reply'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Subscribe.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:31e1a3a9ff5d8763ad425f8c04b306d5)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Subscribe extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_subscribe';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Group
+ *
+ * @var int unsigned
+ */
+ public $group_id;
+ /**
+ * FK to Contact
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * Security hash
+ *
+ * @var string
+ */
+ public $hash;
+ /**
+ * When this subscription event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_subscribe
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_subscribe';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'group_id', 'civicrm_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Subscribe ID') ,
+ 'required' => true,
+ ) ,
+ 'group_id' => array(
+ 'name' => 'group_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Subscribe Group') ,
+ 'description' => 'FK to Group',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Group',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_group',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ 'contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Subscribe Contact') ,
+ 'description' => 'FK to Contact',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'hash' => array(
+ 'name' => 'hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Mailing Subscribe Hash') ,
+ 'description' => 'Security hash',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Mailing Subscribe Timestamp') ,
+ 'description' => 'When this subscription event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'group_id' => 'group_id',
+ 'contact_id' => 'contact_id',
+ 'hash' => 'hash',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_subscribe'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_subscribe'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/TrackableURLOpen.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:f3771f03fc014166292f068b03f847c7)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_TrackableURLOpen extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_trackable_url_open';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * FK to TrackableURL
+ *
+ * @var int unsigned
+ */
+ public $trackable_url_id;
+ /**
+ * When this trackable URL open occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_trackable_url_open
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_trackable_url_open';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'trackable_url_id', 'civicrm_mailing_trackable_url', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Trackable URL Open ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'trackable_url_id' => array(
+ 'name' => 'trackable_url_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Trackable Url') ,
+ 'description' => 'FK to TrackableURL',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_DAO_TrackableURL',
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Timestamp') ,
+ 'description' => 'When this trackable URL open occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'trackable_url_id' => 'trackable_url_id',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_trackable_url_open'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_trackable_url_open'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Mailing/Event/Unsubscribe.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:d75a8925da0586b6b73af970f73e2990)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Mailing_Event_DAO_Unsubscribe extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_mailing_event_unsubscribe';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to EventQueue
+ *
+ * @var int unsigned
+ */
+ public $event_queue_id;
+ /**
+ * Unsubscribe at org- or group-level
+ *
+ * @var boolean
+ */
+ public $org_unsubscribe;
+ /**
+ * When this delivery event occurred.
+ *
+ * @var datetime
+ */
+ public $time_stamp;
+ /**
+ * class constructor
+ *
+ * @return civicrm_mailing_event_unsubscribe
+ */
+ function __construct() {
+ $this->__table = 'civicrm_mailing_event_unsubscribe';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'event_queue_id', 'civicrm_mailing_event_queue', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Unsubscribe ID') ,
+ 'required' => true,
+ ) ,
+ 'event_queue_id' => array(
+ 'name' => 'event_queue_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Mailing Event Queue') ,
+ 'description' => 'FK to EventQueue',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Mailing_Event_DAO_Queue',
+ ) ,
+ 'org_unsubscribe' => array(
+ 'name' => 'org_unsubscribe',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Unsubscribe is for Organization?') ,
+ 'description' => 'Unsubscribe at org- or group-level',
+ 'required' => true,
+ ) ,
+ 'time_stamp' => array(
+ 'name' => 'time_stamp',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Unsubscribe Timestamp') ,
+ 'description' => 'When this delivery event occurred.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'event_queue_id' => 'event_queue_id',
+ 'org_unsubscribe' => 'org_unsubscribe',
+ 'time_stamp' => 'time_stamp',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['mailing_event_unsubscribe'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['mailing_event_unsubscribe'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/Membership.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b9b436f1d3cc569db8b8c05adb8240b5)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_Membership extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Membership Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to Membership Type
+ *
+ * @var int unsigned
+ */
+ public $membership_type_id;
+ /**
+ * Beginning of initial membership period (member since...).
+ *
+ * @var date
+ */
+ public $join_date;
+ /**
+ * Beginning of current uninterrupted membership period.
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * Current membership period expire date.
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ *
+ * @var string
+ */
+ public $source;
+ /**
+ * FK to Membership Status
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.
+ *
+ * @var boolean
+ */
+ public $is_override;
+ /**
+ * Optional FK to Parent Membership.
+ *
+ * @var int unsigned
+ */
+ public $owner_membership_id;
+ /**
+ * Maximum number of related memberships (membership_type override).
+ *
+ * @var int
+ */
+ public $max_related;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_pay_later;
+ /**
+ * Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
+ *
+ * @var int unsigned
+ */
+ public $contribution_recur_id;
+ /**
+ * The campaign for which this membership is attached.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_id', 'civicrm_membership_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_membership_status', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'owner_membership_id', 'civicrm_membership', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_recur_id', 'civicrm_contribution_recur', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'membership_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership ID') ,
+ 'description' => 'Membership Id',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_membership.id',
+ 'headerPattern' => '/^(m(embership\s)?id)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'membership_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_membership.contact_id',
+ 'headerPattern' => '/contact(.?id)?/i',
+ 'dataPattern' => '/^\d+$/',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'membership_type_id' => array(
+ 'name' => 'membership_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type Id') ,
+ 'description' => 'FK to Membership Type',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_membership.membership_type_id',
+ 'headerPattern' => '/^(m(embership\s)?type)$/i',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'FKClassName' => 'CRM_Member_DAO_MembershipType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_membership_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'join_date' => array(
+ 'name' => 'join_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Member Since') ,
+ 'description' => 'Beginning of initial membership period (member since...).',
+ 'import' => true,
+ 'where' => 'civicrm_membership.join_date',
+ 'headerPattern' => '/^join|(j(oin\s)?date)$/i',
+ 'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'membership_start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Membership Start Date') ,
+ 'description' => 'Beginning of current uninterrupted membership period.',
+ 'import' => true,
+ 'where' => 'civicrm_membership.start_date',
+ 'headerPattern' => '/(member(ship)?.)?start(s)?(.date$)?/i',
+ 'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'membership_end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Membership Expiration Date') ,
+ 'description' => 'Current membership period expire date.',
+ 'import' => true,
+ 'where' => 'civicrm_membership.end_date',
+ 'headerPattern' => '/(member(ship)?.)?end(s)?(.date$)?/i',
+ 'dataPattern' => '/\d{4}-?\d{2}-?\d{2}/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'membership_source' => array(
+ 'name' => 'source',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Source') ,
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_membership.source',
+ 'headerPattern' => '/^(member(ship?))?source$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Status Id') ,
+ 'description' => 'FK to Membership Status',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_membership.status_id',
+ 'headerPattern' => '/(member(ship|).)?(status)$/i',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'FKClassName' => 'CRM_Member_DAO_MembershipStatus',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_membership_status',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'label',
+ )
+ ) ,
+ 'is_override' => array(
+ 'name' => 'is_override',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Status Override') ,
+ 'description' => 'Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.',
+ 'import' => true,
+ 'where' => 'civicrm_membership.is_override',
+ 'headerPattern' => '/override$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'owner_membership_id' => array(
+ 'name' => 'owner_membership_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Primary Member ID') ,
+ 'description' => 'Optional FK to Parent Membership.',
+ 'export' => true,
+ 'where' => 'civicrm_membership.owner_membership_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'FKClassName' => 'CRM_Member_DAO_Membership',
+ ) ,
+ 'max_related' => array(
+ 'name' => 'max_related',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Max Related') ,
+ 'description' => 'Maximum number of related memberships (membership_type override).',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'member_is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_membership.is_test',
+ 'headerPattern' => '/(is.)?test(.member(ship)?)?/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'member_is_pay_later' => array(
+ 'name' => 'is_pay_later',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Pay Later') ,
+ 'import' => true,
+ 'where' => 'civicrm_membership.is_pay_later',
+ 'headerPattern' => '/(is.)?(pay(.)?later)$/i',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'contribution_recur_id' => array(
+ 'name' => 'contribution_recur_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Recurring Contribution') ,
+ 'description' => 'Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.',
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionRecur',
+ ) ,
+ 'member_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this membership is attached.',
+ 'import' => true,
+ 'where' => 'civicrm_membership.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'membership_id',
+ 'contact_id' => 'membership_contact_id',
+ 'membership_type_id' => 'membership_type_id',
+ 'join_date' => 'join_date',
+ 'start_date' => 'membership_start_date',
+ 'end_date' => 'membership_end_date',
+ 'source' => 'membership_source',
+ 'status_id' => 'status_id',
+ 'is_override' => 'is_override',
+ 'owner_membership_id' => 'owner_membership_id',
+ 'max_related' => 'max_related',
+ 'is_test' => 'member_is_test',
+ 'is_pay_later' => 'member_is_pay_later',
+ 'contribution_recur_id' => 'contribution_recur_id',
+ 'campaign_id' => 'member_campaign_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/MembershipBlock.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:7b3991d790ed45fb4be2f9d4de4389da)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_MembershipBlock extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership_block';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Membership Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name for Membership Status
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to civicrm_contribution_page.id
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Membership types to be exposed by this block
+ *
+ * @var string
+ */
+ public $membership_types;
+ /**
+ * Optional foreign key to membership_type
+ *
+ * @var int unsigned
+ */
+ public $membership_type_default;
+ /**
+ * Display minimum membership fee
+ *
+ * @var boolean
+ */
+ public $display_min_fee;
+ /**
+ * Should membership transactions be processed separately
+ *
+ * @var boolean
+ */
+ public $is_separate_payment;
+ /**
+ * Title to display at top of block
+ *
+ * @var string
+ */
+ public $new_title;
+ /**
+ * Text to display below title
+ *
+ * @var text
+ */
+ public $new_text;
+ /**
+ * Title for renewal
+ *
+ * @var string
+ */
+ public $renewal_title;
+ /**
+ * Text to display for member renewal
+ *
+ * @var text
+ */
+ public $renewal_text;
+ /**
+ * Is membership sign up optional
+ *
+ * @var boolean
+ */
+ public $is_required;
+ /**
+ * Is this membership_block enabled
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership_block
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership_block';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'entity_id', 'civicrm_contribution_page', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_default', 'civicrm_membership_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Block ID') ,
+ 'description' => 'Membership Id',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Block Entity Table') ,
+ 'description' => 'Name for Membership Status',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Block Entity ID') ,
+ 'description' => 'FK to civicrm_contribution_page.id',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
+ ) ,
+ 'membership_types' => array(
+ 'name' => 'membership_types',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Block Membership Types') ,
+ 'description' => 'Membership types to be exposed by this block',
+ 'maxlength' => 1024,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'membership_type_default' => array(
+ 'name' => 'membership_type_default',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Block Default Type') ,
+ 'description' => 'Optional foreign key to membership_type',
+ 'FKClassName' => 'CRM_Member_DAO_MembershipType',
+ ) ,
+ 'display_min_fee' => array(
+ 'name' => 'display_min_fee',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Membership Block Display Minimum Fee') ,
+ 'description' => 'Display minimum membership fee',
+ 'default' => '1',
+ ) ,
+ 'is_separate_payment' => array(
+ 'name' => 'is_separate_payment',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Membership Block Is Separate Payment') ,
+ 'description' => 'Should membership transactions be processed separately',
+ 'default' => '1',
+ ) ,
+ 'new_title' => array(
+ 'name' => 'new_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Block New Title') ,
+ 'description' => 'Title to display at top of block',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'new_text' => array(
+ 'name' => 'new_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Membership Block New Text') ,
+ 'description' => 'Text to display below title',
+ ) ,
+ 'renewal_title' => array(
+ 'name' => 'renewal_title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Block Renewal Title') ,
+ 'description' => 'Title for renewal',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'renewal_text' => array(
+ 'name' => 'renewal_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Membership Block Renewal Text') ,
+ 'description' => 'Text to display for member renewal',
+ ) ,
+ 'is_required' => array(
+ 'name' => 'is_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Required') ,
+ 'description' => 'Is membership sign up optional',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is this membership_block enabled',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'membership_types' => 'membership_types',
+ 'membership_type_default' => 'membership_type_default',
+ 'display_min_fee' => 'display_min_fee',
+ 'is_separate_payment' => 'is_separate_payment',
+ 'new_title' => 'new_title',
+ 'new_text' => 'new_text',
+ 'renewal_title' => 'renewal_title',
+ 'renewal_text' => 'renewal_text',
+ 'is_required' => 'is_required',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership_block'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership_block'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/MembershipLog.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:042304122b10dd63a662bbe64148d130)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_MembershipLog extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership_log';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Membership table
+ *
+ * @var int unsigned
+ */
+ public $membership_id;
+ /**
+ * New status assigned to membership by this action. FK to Membership Status
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * New membership period start date
+ *
+ * @var date
+ */
+ public $start_date;
+ /**
+ * New membership period expiration date.
+ *
+ * @var date
+ */
+ public $end_date;
+ /**
+ * FK to Contact ID of person under whose credentials this data modification was made.
+ *
+ * @var int unsigned
+ */
+ public $modified_id;
+ /**
+ * Date this membership modification action was logged.
+ *
+ * @var date
+ */
+ public $modified_date;
+ /**
+ * FK to Membership Type.
+ *
+ * @var int unsigned
+ */
+ public $membership_type_id;
+ /**
+ * Maximum number of related memberships.
+ *
+ * @var int
+ */
+ public $max_related;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership_log
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership_log';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_id', 'civicrm_membership', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'status_id', 'civicrm_membership_status', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'modified_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_id', 'civicrm_membership_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Log ID') ,
+ 'required' => true,
+ ) ,
+ 'membership_id' => array(
+ 'name' => 'membership_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership ID') ,
+ 'description' => 'FK to Membership table',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Member_DAO_Membership',
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Status') ,
+ 'description' => 'New status assigned to membership by this action. FK to Membership Status',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Member_DAO_MembershipStatus',
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Membership Log Start Date') ,
+ 'description' => 'New membership period start date',
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Membership Log End Date') ,
+ 'description' => 'New membership period expiration date.',
+ ) ,
+ 'modified_id' => array(
+ 'name' => 'modified_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Log modified By') ,
+ 'description' => 'FK to Contact ID of person under whose credentials this data modification was made.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE,
+ 'title' => ts('Membership Change Date') ,
+ 'description' => 'Date this membership modification action was logged.',
+ ) ,
+ 'membership_type_id' => array(
+ 'name' => 'membership_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type ID') ,
+ 'description' => 'FK to Membership Type.',
+ 'FKClassName' => 'CRM_Member_DAO_MembershipType',
+ ) ,
+ 'max_related' => array(
+ 'name' => 'max_related',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum Related Memberships') ,
+ 'description' => 'Maximum number of related memberships.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'membership_id' => 'membership_id',
+ 'status_id' => 'status_id',
+ 'start_date' => 'start_date',
+ 'end_date' => 'end_date',
+ 'modified_id' => 'modified_id',
+ 'modified_date' => 'modified_date',
+ 'membership_type_id' => 'membership_type_id',
+ 'max_related' => 'max_related',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership_log'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership_log'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/MembershipPayment.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:071a70d1fd0826ba11de4e85e8debe92)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_MembershipPayment extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership_payment';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Membership table
+ *
+ * @var int unsigned
+ */
+ public $membership_id;
+ /**
+ * FK to contribution table.
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership_payment
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership_payment';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_id', 'civicrm_membership', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Payment ID') ,
+ 'required' => true,
+ ) ,
+ 'membership_id' => array(
+ 'name' => 'membership_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership') ,
+ 'description' => 'FK to Membership table',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Member_DAO_Membership',
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution') ,
+ 'description' => 'FK to contribution table.',
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'membership_id' => 'membership_id',
+ 'contribution_id' => 'contribution_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership_payment'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership_payment'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/MembershipStatus.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:bdac419828ba2cd3b35ec8684e1e724b)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_MembershipStatus extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership_status';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Membership Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name for Membership Status
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Label for Membership Status
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * Event when this status starts.
+ *
+ * @var string
+ */
+ public $start_event;
+ /**
+ * Unit used for adjusting from start_event.
+ *
+ * @var string
+ */
+ public $start_event_adjust_unit;
+ /**
+ * Status range begins this many units from start_event.
+ *
+ * @var int
+ */
+ public $start_event_adjust_interval;
+ /**
+ * Event after which this status ends.
+ *
+ * @var string
+ */
+ public $end_event;
+ /**
+ * Unit used for adjusting from the ending event.
+ *
+ * @var string
+ */
+ public $end_event_adjust_unit;
+ /**
+ * Status range ends this many units from end_event.
+ *
+ * @var int
+ */
+ public $end_event_adjust_interval;
+ /**
+ * Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).
+ *
+ * @var boolean
+ */
+ public $is_current_member;
+ /**
+ * Is this status for admin/manual assignment only.
+ *
+ * @var boolean
+ */
+ public $is_admin;
+ /**
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Assign this status to a membership record if no other status match is found.
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Is this membership_status enabled.
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this membership_status reserved.
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership_status
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership_status';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Status ID') ,
+ 'description' => 'Membership Id',
+ 'required' => true,
+ ) ,
+ 'membership_status' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Status') ,
+ 'description' => 'Name for Membership Status',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_membership_status.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label') ,
+ 'description' => 'Label for Membership Status',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'start_event' => array(
+ 'name' => 'start_event',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Start Event') ,
+ 'description' => 'Event when this status starts.',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::eventDate',
+ )
+ ) ,
+ 'start_event_adjust_unit' => array(
+ 'name' => 'start_event_adjust_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Start Event Adjust Unit') ,
+ 'description' => 'Unit used for adjusting from start_event.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::unitList',
+ )
+ ) ,
+ 'start_event_adjust_interval' => array(
+ 'name' => 'start_event_adjust_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Start Event Adjust Interval') ,
+ 'description' => 'Status range begins this many units from start_event.',
+ ) ,
+ 'end_event' => array(
+ 'name' => 'end_event',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('End Event') ,
+ 'description' => 'Event after which this status ends.',
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::eventDate',
+ )
+ ) ,
+ 'end_event_adjust_unit' => array(
+ 'name' => 'end_event_adjust_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('End Event Adjust Unit') ,
+ 'description' => 'Unit used for adjusting from the ending event.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::unitList',
+ )
+ ) ,
+ 'end_event_adjust_interval' => array(
+ 'name' => 'end_event_adjust_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('End Event Adjust Interval') ,
+ 'description' => 'Status range ends this many units from end_event.',
+ ) ,
+ 'is_current_member' => array(
+ 'name' => 'is_current_member',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Current Membership?') ,
+ 'description' => 'Does this status aggregate to current members (e.g. New, Renewed, Grace might all be TRUE... while Unrenewed, Lapsed, Inactive would be FALSE).',
+ ) ,
+ 'is_admin' => array(
+ 'name' => 'is_admin',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Admin Assigned Only?') ,
+ 'description' => 'Is this status for admin/manual assignment only.',
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Default Status?') ,
+ 'description' => 'Assign this status to a membership record if no other status match is found.',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is this membership_status enabled.',
+ 'default' => '1',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Reserved') ,
+ 'description' => 'Is this membership_status reserved.',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'membership_status',
+ 'label' => 'label',
+ 'start_event' => 'start_event',
+ 'start_event_adjust_unit' => 'start_event_adjust_unit',
+ 'start_event_adjust_interval' => 'start_event_adjust_interval',
+ 'end_event' => 'end_event',
+ 'end_event_adjust_unit' => 'end_event_adjust_unit',
+ 'end_event_adjust_interval' => 'end_event_adjust_interval',
+ 'is_current_member' => 'is_current_member',
+ 'is_admin' => 'is_admin',
+ 'weight' => 'weight',
+ 'is_default' => 'is_default',
+ 'is_active' => 'is_active',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership_status'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership_status'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Member/MembershipType.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:3518fd802e10d1da771f735a949b4350)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_membership_type';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Membership Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this match entry for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Name of Membership Type
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Description of Membership Type
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * Owner organization for this membership type. FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $member_of_contact_id;
+ /**
+ * If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Minimum fee for this membership (0 for free/complimentary memberships).
+ *
+ * @var float
+ */
+ public $minimum_fee;
+ /**
+ * Unit in which membership period is expressed.
+ *
+ * @var string
+ */
+ public $duration_unit;
+ /**
+ * Number of duration units in membership period (e.g. 1 year, 12 months).
+ *
+ * @var int
+ */
+ public $duration_interval;
+ /**
+ * Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.
+ *
+ * @var string
+ */
+ public $period_type;
+ /**
+ * For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.
+ *
+ * @var int
+ */
+ public $fixed_period_start_day;
+ /**
+ * For fixed period memberships, signups after this day (mmdd) rollover to next period.
+ *
+ * @var int
+ */
+ public $fixed_period_rollover_day;
+ /**
+ * FK to Relationship Type ID
+ *
+ * @var string
+ */
+ public $relationship_type_id;
+ /**
+ *
+ * @var string
+ */
+ public $relationship_direction;
+ /**
+ * Maximum number of related memberships.
+ *
+ * @var int
+ */
+ public $max_related;
+ /**
+ *
+ * @var string
+ */
+ public $visibility;
+ /**
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Receipt Text for membership signup
+ *
+ * @var string
+ */
+ public $receipt_text_signup;
+ /**
+ * Receipt Text for membership renewal
+ *
+ * @var string
+ */
+ public $receipt_text_renewal;
+ /**
+ * 0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;
+ *
+ * @var boolean
+ */
+ public $auto_renew;
+ /**
+ * Is this membership_type enabled
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_membership_type
+ */
+ function __construct() {
+ $this->__table = 'civicrm_membership_type';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'member_of_contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type ID') ,
+ 'description' => 'Membership Id',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type Domain') ,
+ 'description' => 'Which Domain is this match entry for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'membership_type' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type') ,
+ 'description' => 'Name of Membership Type',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'import' => true,
+ 'where' => 'civicrm_membership_type.name',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Description') ,
+ 'description' => 'Description of Membership Type',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'member_of_contact_id' => array(
+ 'name' => 'member_of_contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type Organization') ,
+ 'description' => 'Owner organization for this membership type. FK to Contact ID',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Financial Type') ,
+ 'description' => 'If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'minimum_fee' => array(
+ 'name' => 'minimum_fee',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('membership Type Minimum Fee') ,
+ 'description' => 'Minimum fee for this membership (0 for free/complimentary memberships).',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'duration_unit' => array(
+ 'name' => 'duration_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Duration Unit') ,
+ 'description' => 'Unit in which membership period is expressed.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::membershipTypeUnitList',
+ )
+ ) ,
+ 'duration_interval' => array(
+ 'name' => 'duration_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type Duration Interval') ,
+ 'description' => 'Number of duration units in membership period (e.g. 1 year, 12 months).',
+ ) ,
+ 'period_type' => array(
+ 'name' => 'period_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Plan') ,
+ 'description' => 'Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::periodType',
+ )
+ ) ,
+ 'fixed_period_start_day' => array(
+ 'name' => 'fixed_period_start_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Fixed Period Start Day') ,
+ 'description' => 'For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.',
+ ) ,
+ 'fixed_period_rollover_day' => array(
+ 'name' => 'fixed_period_rollover_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Fixed Period Rollover Day') ,
+ 'description' => 'For fixed period memberships, signups after this day (mmdd) rollover to next period.',
+ ) ,
+ 'relationship_type_id' => array(
+ 'name' => 'relationship_type_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Relationship') ,
+ 'description' => 'FK to Relationship Type ID',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'relationship_direction' => array(
+ 'name' => 'relationship_direction',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Relationship Direction') ,
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'max_related' => array(
+ 'name' => 'max_related',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Max Related Members for Type') ,
+ 'description' => 'Maximum number of related memberships.',
+ ) ,
+ 'visibility' => array(
+ 'name' => 'visibility',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Visible') ,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::memberVisibility',
+ )
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ ) ,
+ 'receipt_text_signup' => array(
+ 'name' => 'receipt_text_signup',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Receipt Text') ,
+ 'description' => 'Receipt Text for membership signup',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'receipt_text_renewal' => array(
+ 'name' => 'receipt_text_renewal',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Membership Type Renewal Text') ,
+ 'description' => 'Receipt Text for membership renewal',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'auto_renew' => array(
+ 'name' => 'auto_renew',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Auto Renew') ,
+ 'description' => '0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;',
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::memberAutoRenew',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Active') ,
+ 'description' => 'Is this membership_type enabled',
+ 'default' => '1',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'membership_type',
+ 'description' => 'description',
+ 'member_of_contact_id' => 'member_of_contact_id',
+ 'financial_type_id' => 'financial_type_id',
+ 'minimum_fee' => 'minimum_fee',
+ 'duration_unit' => 'duration_unit',
+ 'duration_interval' => 'duration_interval',
+ 'period_type' => 'period_type',
+ 'fixed_period_start_day' => 'fixed_period_start_day',
+ 'fixed_period_rollover_day' => 'fixed_period_rollover_day',
+ 'relationship_type_id' => 'relationship_type_id',
+ 'relationship_direction' => 'relationship_direction',
+ 'max_related' => 'max_related',
+ 'visibility' => 'visibility',
+ 'weight' => 'weight',
+ 'receipt_text_signup' => 'receipt_text_signup',
+ 'receipt_text_renewal' => 'receipt_text_renewal',
+ 'auto_renew' => 'auto_renew',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['membership_type'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['membership_type'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/PCP/PCP.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:6907de7094894326d8adda01b8583dff)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_PCP_DAO_PCP extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_pcp';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Personal Campaign Page ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Contact ID
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ *
+ * @var text
+ */
+ public $intro_text;
+ /**
+ *
+ * @var text
+ */
+ public $page_text;
+ /**
+ *
+ * @var string
+ */
+ public $donate_link_text;
+ /**
+ * The Contribution or Event Page which triggered this pcp
+ *
+ * @var int unsigned
+ */
+ public $page_id;
+ /**
+ * The type of PCP this is: contribute or event
+ *
+ * @var string
+ */
+ public $page_type;
+ /**
+ * The pcp block that this pcp page was created from
+ *
+ * @var int unsigned
+ */
+ public $pcp_block_id;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $is_thermometer;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $is_honor_roll;
+ /**
+ * Goal amount of this Personal Campaign Page.
+ *
+ * @var float
+ */
+ public $goal_amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * Is Personal Campaign Page enabled/active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Notify owner via email when someone donates to page?
+ *
+ * @var boolean
+ */
+ public $is_notify;
+ /**
+ * class constructor
+ *
+ * @return civicrm_pcp
+ */
+ function __construct() {
+ $this->__table = 'civicrm_pcp';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'pcp_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Personal Campaign Page ID') ,
+ 'description' => 'Personal Campaign Page ID',
+ 'required' => true,
+ ) ,
+ 'pcp_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'FK to Contact ID',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Personal Campaign Page Status') ,
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'pcp_status',
+ 'optionEditPath' => 'civicrm/admin/options/pcp_status',
+ )
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Personal Campaign Page Title') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'intro_text' => array(
+ 'name' => 'intro_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Intro Text') ,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'TexArea',
+ ) ,
+ ) ,
+ 'page_text' => array(
+ 'name' => 'page_text',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Page Text') ,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'TexArea',
+ ) ,
+ ) ,
+ 'donate_link_text' => array(
+ 'name' => 'donate_link_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Donate Link Text') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'page_id' => array(
+ 'name' => 'page_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution Page') ,
+ 'description' => 'The Contribution or Event Page which triggered this pcp',
+ 'required' => true,
+ ) ,
+ 'page_type' => array(
+ 'name' => 'page_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('PCP Page Type') ,
+ 'description' => 'The type of PCP this is: contribute or event',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'default' => 'contribute',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'pcp_block_id' => array(
+ 'name' => 'pcp_block_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('PCP Block') ,
+ 'description' => 'The pcp block that this pcp page was created from',
+ 'required' => true,
+ ) ,
+ 'is_thermometer' => array(
+ 'name' => 'is_thermometer',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Use Thermometer?') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_honor_roll' => array(
+ 'name' => 'is_honor_roll',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Show Honor Roll?') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'goal_amount' => array(
+ 'name' => 'goal_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Goal Amount') ,
+ 'description' => 'Goal amount of this Personal Campaign Page.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Enabled?') ,
+ 'description' => 'Is Personal Campaign Page enabled/active?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_notify' => array(
+ 'name' => 'is_notify',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Notify Owner?') ,
+ 'description' => 'Notify owner via email when someone donates to page?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'pcp_id',
+ 'contact_id' => 'pcp_contact_id',
+ 'status_id' => 'status_id',
+ 'title' => 'title',
+ 'intro_text' => 'intro_text',
+ 'page_text' => 'page_text',
+ 'donate_link_text' => 'donate_link_text',
+ 'page_id' => 'page_id',
+ 'page_type' => 'page_type',
+ 'pcp_block_id' => 'pcp_block_id',
+ 'is_thermometer' => 'is_thermometer',
+ 'is_honor_roll' => 'is_honor_roll',
+ 'goal_amount' => 'goal_amount',
+ 'currency' => 'currency',
+ 'is_active' => 'is_active',
+ 'is_notify' => 'is_notify',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['pcp'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['pcp'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/PCP/PCPBlock.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:70cc9c902451ab71595e03dde9ca6bdc)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_PCP_DAO_PCPBlock extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_pcp_block';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * PCP block Id
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to civicrm_contribution_page.id OR civicrm_event.id
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * The type of entity that this pcp targets
+ *
+ * @var string
+ */
+ public $target_entity_type;
+ /**
+ * The entity that this pcp targets
+ *
+ * @var int unsigned
+ */
+ public $target_entity_id;
+ /**
+ * FK to civicrm_uf_group.id. Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?
+ *
+ * @var int unsigned
+ */
+ public $supporter_profile_id;
+ /**
+ * FK to civicrm_option_group with name = PCP owner notifications
+ *
+ * @var int unsigned
+ */
+ public $owner_notify_id;
+ /**
+ * Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?
+ *
+ * @var boolean
+ */
+ public $is_approval_needed;
+ /**
+ * Does Personal Campaign Page allow using tell a friend?
+ *
+ * @var boolean
+ */
+ public $is_tellfriend_enabled;
+ /**
+ * Maximum recipient fields allowed in tell a friend
+ *
+ * @var int unsigned
+ */
+ public $tellfriend_limit;
+ /**
+ * Link text for PCP.
+ *
+ * @var string
+ */
+ public $link_text;
+ /**
+ * Is Personal Campaign Page Block enabled/active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * If set, notification is automatically emailed to this email-address on create/update Personal Campaign Page
+ *
+ * @var string
+ */
+ public $notify_email;
+ /**
+ * class constructor
+ *
+ * @return civicrm_pcp_block
+ */
+ function __construct() {
+ $this->__table = 'civicrm_pcp_block';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'supporter_profile_id', 'civicrm_uf_group', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'target_entity_id', NULL, 'id', 'target_entity_type');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('PCP Block ID') ,
+ 'description' => 'PCP block Id',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity') ,
+ 'description' => 'FK to civicrm_contribution_page.id OR civicrm_event.id',
+ 'required' => true,
+ ) ,
+ 'target_entity_type' => array(
+ 'name' => 'target_entity_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Target Entity') ,
+ 'description' => 'The type of entity that this pcp targets',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'contribute',
+ ) ,
+ 'target_entity_id' => array(
+ 'name' => 'target_entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Target Entity ID') ,
+ 'description' => 'The entity that this pcp targets',
+ 'required' => true,
+ ) ,
+ 'supporter_profile_id' => array(
+ 'name' => 'supporter_profile_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Supporter Profile') ,
+ 'description' => 'FK to civicrm_uf_group.id. Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Core_DAO_UFGroup',
+ ) ,
+ 'owner_notify_id' => array(
+ 'name' => 'owner_notify_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Owner Notification') ,
+ 'description' => 'FK to civicrm_option_group with name = PCP owner notifications',
+ 'html' => array(
+ 'type' => 'Radio',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'pcp_owner_notify',
+ 'optionEditPath' => 'civicrm/admin/options/pcp_owner_notify',
+ )
+ ) ,
+ 'is_approval_needed' => array(
+ 'name' => 'is_approval_needed',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Approval Required?') ,
+ 'description' => 'Does Personal Campaign Page require manual activation by administrator? (is inactive by default after setup)?',
+ 'default' => 'NULL',
+ ) ,
+ 'is_tellfriend_enabled' => array(
+ 'name' => 'is_tellfriend_enabled',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Tell a Friend Enabled?') ,
+ 'description' => 'Does Personal Campaign Page allow using tell a friend?',
+ 'default' => 'NULL',
+ ) ,
+ 'tellfriend_limit' => array(
+ 'name' => 'tellfriend_limit',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Tell A Friend Limit') ,
+ 'description' => 'Maximum recipient fields allowed in tell a friend',
+ 'default' => 'NULL',
+ ) ,
+ 'link_text' => array(
+ 'name' => 'link_text',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Link Text') ,
+ 'description' => 'Link text for PCP.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Enabled?') ,
+ 'description' => 'Is Personal Campaign Page Block enabled/active?',
+ 'default' => '1',
+ ) ,
+ 'notify_email' => array(
+ 'name' => 'notify_email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Notification Email') ,
+ 'description' => 'If set, notification is automatically emailed to this email-address on create/update Personal Campaign Page',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'target_entity_type' => 'target_entity_type',
+ 'target_entity_id' => 'target_entity_id',
+ 'supporter_profile_id' => 'supporter_profile_id',
+ 'owner_notify_id' => 'owner_notify_id',
+ 'is_approval_needed' => 'is_approval_needed',
+ 'is_tellfriend_enabled' => 'is_tellfriend_enabled',
+ 'tellfriend_limit' => 'tellfriend_limit',
+ 'link_text' => 'link_text',
+ 'is_active' => 'is_active',
+ 'notify_email' => 'notify_email',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['pcp_block'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['pcp_block'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Pledge/Pledge.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:db51fcee346b89501025824b7b0cb45f)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Pledge_DAO_Pledge extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_pledge';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Pledge ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Foreign key to civicrm_contact.id .
+ *
+ * @var int unsigned
+ */
+ public $contact_id;
+ /**
+ * FK to Financial Type
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * The Contribution Page which triggered this contribution
+ *
+ * @var int unsigned
+ */
+ public $contribution_page_id;
+ /**
+ * Total pledged amount.
+ *
+ * @var float
+ */
+ public $amount;
+ /**
+ * Original amount for each of the installments.
+ *
+ * @var float
+ */
+ public $original_installment_amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * Time units for recurrence of pledge payments.
+ *
+ * @var string
+ */
+ public $frequency_unit;
+ /**
+ * Number of time units for recurrence of pledge payments.
+ *
+ * @var int unsigned
+ */
+ public $frequency_interval;
+ /**
+ * Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.
+ *
+ * @var int unsigned
+ */
+ public $frequency_day;
+ /**
+ * Total number of payments to be made.
+ *
+ * @var int unsigned
+ */
+ public $installments;
+ /**
+ * The date the first scheduled pledge occurs.
+ *
+ * @var datetime
+ */
+ public $start_date;
+ /**
+ * When this pledge record was created.
+ *
+ * @var datetime
+ */
+ public $create_date;
+ /**
+ * When a pledge acknowledgement message was sent to the contributor.
+ *
+ * @var datetime
+ */
+ public $acknowledge_date;
+ /**
+ * Last updated date for this pledge record.
+ *
+ * @var datetime
+ */
+ public $modified_date;
+ /**
+ * Date this pledge was cancelled by contributor.
+ *
+ * @var datetime
+ */
+ public $cancel_date;
+ /**
+ * Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).
+ *
+ * @var datetime
+ */
+ public $end_date;
+ /**
+ * The maximum number of payment reminders to send for any given payment.
+ *
+ * @var int unsigned
+ */
+ public $max_reminders;
+ /**
+ * Send initial reminder this many days prior to the payment due date.
+ *
+ * @var int unsigned
+ */
+ public $initial_reminder_day;
+ /**
+ * Send additional reminder this many days after last one sent, up to maximum number of reminders.
+ *
+ * @var int unsigned
+ */
+ public $additional_reminder_day;
+ /**
+ * Implicit foreign key to civicrm_option_values in the contribution_status option group.
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_test;
+ /**
+ * The campaign for which this pledge has been initiated.
+ *
+ * @var int unsigned
+ */
+ public $campaign_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_pledge
+ */
+ function __construct() {
+ $this->__table = 'civicrm_pledge';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contact_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_page_id', 'civicrm_contribution_page', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'campaign_id', 'civicrm_campaign', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'pledge_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge ID') ,
+ 'description' => 'Pledge ID',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_pledge.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_contact_id' => array(
+ 'name' => 'contact_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contact ID') ,
+ 'description' => 'Foreign key to civicrm_contact.id .',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_pledge.contact_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'EntityRef',
+ ) ,
+ ) ,
+ 'pledge_financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Type') ,
+ 'description' => 'FK to Financial Type',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'pledge_contribution_page_id' => array(
+ 'name' => 'contribution_page_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge Contribution Page') ,
+ 'description' => 'The Contribution Page which triggered this contribution',
+ 'FKClassName' => 'CRM_Contribute_DAO_ContributionPage',
+ ) ,
+ 'pledge_amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Total Pledged') ,
+ 'description' => 'Total pledged amount.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_pledge.amount',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'pledge_original_installment_amount' => array(
+ 'name' => 'original_installment_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Original Installment Amount') ,
+ 'description' => 'Original amount for each of the installments.',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Pledge Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'pledge_frequency_unit' => array(
+ 'name' => 'frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Pledge Frequency Unit') ,
+ 'description' => 'Time units for recurrence of pledge payments.',
+ 'maxlength' => 8,
+ 'size' => CRM_Utils_Type::EIGHT,
+ 'default' => 'month',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'recur_frequency_units',
+ 'keyColumn' => 'name',
+ 'optionEditPath' => 'civicrm/admin/options/recur_frequency_units',
+ )
+ ) ,
+ 'pledge_frequency_interval' => array(
+ 'name' => 'frequency_interval',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge Frequency Interval') ,
+ 'description' => 'Number of time units for recurrence of pledge payments.',
+ 'required' => true,
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'frequency_day' => array(
+ 'name' => 'frequency_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge day') ,
+ 'description' => 'Day in the period when the pledge payment is due e.g. 1st of month, 15th etc. Use this to set the scheduled dates for pledge payments.',
+ 'required' => true,
+ 'default' => '3',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'installments' => array(
+ 'name' => 'installments',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge Number of Installments') ,
+ 'description' => 'Total number of payments to be made.',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'start_date' => array(
+ 'name' => 'start_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge Start Date') ,
+ 'description' => 'The date the first scheduled pledge occurs.',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'pledge_create_date' => array(
+ 'name' => 'create_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge Made') ,
+ 'description' => 'When this pledge record was created.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_pledge.create_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'acknowledge_date' => array(
+ 'name' => 'acknowledge_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge Acknowledged') ,
+ 'description' => 'When a pledge acknowledgement message was sent to the contributor.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'modified_date' => array(
+ 'name' => 'modified_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge Modified Date') ,
+ 'description' => 'Last updated date for this pledge record.',
+ ) ,
+ 'cancel_date' => array(
+ 'name' => 'cancel_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge Cancelled Date') ,
+ 'description' => 'Date this pledge was cancelled by contributor.',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'end_date' => array(
+ 'name' => 'end_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Pledge End Date') ,
+ 'description' => 'Date this pledge finished successfully (total pledge payments equal to or greater than pledged amount).',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'max_reminders' => array(
+ 'name' => 'max_reminders',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum Number of Reminders') ,
+ 'description' => 'The maximum number of payment reminders to send for any given payment.',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'initial_reminder_day' => array(
+ 'name' => 'initial_reminder_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Initial Reminder Day') ,
+ 'description' => 'Send initial reminder this many days prior to the payment due date.',
+ 'default' => '5',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'additional_reminder_day' => array(
+ 'name' => 'additional_reminder_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Additional Reminder Days') ,
+ 'description' => 'Send additional reminder this many days after last one sent, up to maximum number of reminders.',
+ 'default' => '5',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'pledge_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge Status Id') ,
+ 'description' => 'Implicit foreign key to civicrm_option_values in the contribution_status option group.',
+ 'import' => true,
+ 'where' => 'civicrm_pledge.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'contribution_status',
+ 'optionEditPath' => 'civicrm/admin/options/contribution_status',
+ )
+ ) ,
+ 'pledge_is_test' => array(
+ 'name' => 'is_test',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Test') ,
+ 'import' => true,
+ 'where' => 'civicrm_pledge.is_test',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'pledge_campaign_id' => array(
+ 'name' => 'campaign_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Campaign') ,
+ 'description' => 'The campaign for which this pledge has been initiated.',
+ 'import' => true,
+ 'where' => 'civicrm_pledge.campaign_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_campaign',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'title',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'pledge_id',
+ 'contact_id' => 'pledge_contact_id',
+ 'financial_type_id' => 'pledge_financial_type_id',
+ 'contribution_page_id' => 'pledge_contribution_page_id',
+ 'amount' => 'pledge_amount',
+ 'original_installment_amount' => 'pledge_original_installment_amount',
+ 'currency' => 'currency',
+ 'frequency_unit' => 'pledge_frequency_unit',
+ 'frequency_interval' => 'pledge_frequency_interval',
+ 'frequency_day' => 'frequency_day',
+ 'installments' => 'installments',
+ 'start_date' => 'start_date',
+ 'create_date' => 'pledge_create_date',
+ 'acknowledge_date' => 'acknowledge_date',
+ 'modified_date' => 'modified_date',
+ 'cancel_date' => 'cancel_date',
+ 'end_date' => 'end_date',
+ 'max_reminders' => 'max_reminders',
+ 'initial_reminder_day' => 'initial_reminder_day',
+ 'additional_reminder_day' => 'additional_reminder_day',
+ 'status_id' => 'pledge_status_id',
+ 'is_test' => 'pledge_is_test',
+ 'campaign_id' => 'pledge_campaign_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['pledge'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['pledge'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Pledge/PledgeBlock.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:aac59c4ab10aba51f771548c2f51b411)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Pledge_DAO_PledgeBlock extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_pledge_block';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Pledge ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * physical tablename for entity being joined to pledge, e.g. civicrm_contact
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * FK to entity table specified in entity_table column.
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * Delimited list of supported frequency units
+ *
+ * @var string
+ */
+ public $pledge_frequency_unit;
+ /**
+ * Is frequency interval exposed on the contribution form.
+ *
+ * @var boolean
+ */
+ public $is_pledge_interval;
+ /**
+ * The maximum number of payment reminders to send for any given payment.
+ *
+ * @var int unsigned
+ */
+ public $max_reminders;
+ /**
+ * Send initial reminder this many days prior to the payment due date.
+ *
+ * @var int unsigned
+ */
+ public $initial_reminder_day;
+ /**
+ * Send additional reminder this many days after last one sent, up to maximum number of reminders.
+ *
+ * @var int unsigned
+ */
+ public $additional_reminder_day;
+ /**
+ * The date the first scheduled pledge occurs.
+ *
+ * @var string
+ */
+ public $pledge_start_date;
+ /**
+ * If true - recurring start date is shown.
+ *
+ * @var boolean
+ */
+ public $is_pledge_start_date_visible;
+ /**
+ * If true - recurring start date is editable.
+ *
+ * @var boolean
+ */
+ public $is_pledge_start_date_editable;
+ /**
+ * class constructor
+ *
+ * @return civicrm_pledge_block
+ */
+ function __construct() {
+ $this->__table = 'civicrm_pledge_block';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge Block ID') ,
+ 'description' => 'Pledge ID',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'physical tablename for entity being joined to pledge, e.g. civicrm_contact',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity Id') ,
+ 'description' => 'FK to entity table specified in entity_table column.',
+ 'required' => true,
+ ) ,
+ 'pledge_frequency_unit' => array(
+ 'name' => 'pledge_frequency_unit',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Pledge Frequency Unit') ,
+ 'description' => 'Delimited list of supported frequency units',
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ ) ,
+ 'is_pledge_interval' => array(
+ 'name' => 'is_pledge_interval',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Expose Frequency Interval?') ,
+ 'description' => 'Is frequency interval exposed on the contribution form.',
+ ) ,
+ 'max_reminders' => array(
+ 'name' => 'max_reminders',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Maximum Number of Reminders') ,
+ 'description' => 'The maximum number of payment reminders to send for any given payment.',
+ 'default' => '1',
+ ) ,
+ 'initial_reminder_day' => array(
+ 'name' => 'initial_reminder_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Initial Reminder Day') ,
+ 'description' => 'Send initial reminder this many days prior to the payment due date.',
+ 'default' => '5',
+ ) ,
+ 'additional_reminder_day' => array(
+ 'name' => 'additional_reminder_day',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Additional Reminder Days') ,
+ 'description' => 'Send additional reminder this many days after last one sent, up to maximum number of reminders.',
+ 'default' => '5',
+ ) ,
+ 'pledge_start_date' => array(
+ 'name' => 'pledge_start_date',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Pledge Start Date') ,
+ 'description' => 'The date the first scheduled pledge occurs.',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'is_pledge_start_date_visible' => array(
+ 'name' => 'is_pledge_start_date_visible',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Show Recurring Donation Start Date?') ,
+ 'description' => 'If true - recurring start date is shown.',
+ 'required' => true,
+ ) ,
+ 'is_pledge_start_date_editable' => array(
+ 'name' => 'is_pledge_start_date_editable',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Allow Edits to Recurring Donation Start Date?') ,
+ 'description' => 'If true - recurring start date is editable.',
+ 'required' => true,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'pledge_frequency_unit' => 'pledge_frequency_unit',
+ 'is_pledge_interval' => 'is_pledge_interval',
+ 'max_reminders' => 'max_reminders',
+ 'initial_reminder_day' => 'initial_reminder_day',
+ 'additional_reminder_day' => 'additional_reminder_day',
+ 'pledge_start_date' => 'pledge_start_date',
+ 'is_pledge_start_date_visible' => 'is_pledge_start_date_visible',
+ 'is_pledge_start_date_editable' => 'is_pledge_start_date_editable',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['pledge_block'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['pledge_block'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Pledge/PledgePayment.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:acf3d611f37789686efd49c5f97aff97)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Pledge_DAO_PledgePayment extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_pledge_payment';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to Pledge table
+ *
+ * @var int unsigned
+ */
+ public $pledge_id;
+ /**
+ * FK to contribution table.
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * Pledged amount for this payment (the actual contribution amount might be different).
+ *
+ * @var float
+ */
+ public $scheduled_amount;
+ /**
+ * Actual amount that is paid as the Pledged installment amount.
+ *
+ * @var float
+ */
+ public $actual_amount;
+ /**
+ * 3 character string, value from config setting or input via user.
+ *
+ * @var string
+ */
+ public $currency;
+ /**
+ * The date the pledge payment is supposed to happen.
+ *
+ * @var datetime
+ */
+ public $scheduled_date;
+ /**
+ * The date that the most recent payment reminder was sent.
+ *
+ * @var datetime
+ */
+ public $reminder_date;
+ /**
+ * The number of payment reminders sent.
+ *
+ * @var int unsigned
+ */
+ public $reminder_count;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $status_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_pledge_payment
+ */
+ function __construct() {
+ $this->__table = 'civicrm_pledge_payment';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'pledge_id', 'civicrm_pledge', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'pledge_payment_id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment ID') ,
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_id' => array(
+ 'name' => 'pledge_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Pledge') ,
+ 'description' => 'FK to Pledge table',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Pledge_DAO_Pledge',
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Contribution') ,
+ 'description' => 'FK to contribution table.',
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ 'pledge_payment_scheduled_amount' => array(
+ 'name' => 'scheduled_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Scheduled Amount') ,
+ 'description' => 'Pledged amount for this payment (the actual contribution amount might be different).',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.scheduled_amount',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_payment_actual_amount' => array(
+ 'name' => 'actual_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Actual Amount') ,
+ 'description' => 'Actual amount that is paid as the Pledged installment amount.',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.actual_amount',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'currency' => array(
+ 'name' => 'currency',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Currency') ,
+ 'description' => '3 character string, value from config setting or input via user.',
+ 'maxlength' => 3,
+ 'size' => CRM_Utils_Type::FOUR,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_currency',
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'full_name',
+ 'nameColumn' => 'name',
+ )
+ ) ,
+ 'pledge_payment_scheduled_date' => array(
+ 'name' => 'scheduled_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Scheduled Date') ,
+ 'description' => 'The date the pledge payment is supposed to happen.',
+ 'required' => true,
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.scheduled_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_payment_reminder_date' => array(
+ 'name' => 'reminder_date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Last Reminder') ,
+ 'description' => 'The date that the most recent payment reminder was sent.',
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.reminder_date',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_payment_reminder_count' => array(
+ 'name' => 'reminder_count',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Reminders Sent') ,
+ 'description' => 'The number of payment reminders sent.',
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.reminder_count',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'pledge_payment_status_id' => array(
+ 'name' => 'status_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Payment Status') ,
+ 'import' => true,
+ 'where' => 'civicrm_pledge_payment.status_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => false,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'contribution_status',
+ 'optionEditPath' => 'civicrm/admin/options/contribution_status',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'pledge_payment_id',
+ 'pledge_id' => 'pledge_id',
+ 'contribution_id' => 'contribution_id',
+ 'scheduled_amount' => 'pledge_payment_scheduled_amount',
+ 'actual_amount' => 'pledge_payment_actual_amount',
+ 'currency' => 'currency',
+ 'scheduled_date' => 'pledge_payment_scheduled_date',
+ 'reminder_date' => 'pledge_payment_reminder_date',
+ 'reminder_count' => 'pledge_payment_reminder_count',
+ 'status_id' => 'pledge_payment_status_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['pledge_payment'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['pledge_payment'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Price/LineItem.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:9b181e507a826afb3c7099f36ac87ccb)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Price_DAO_LineItem extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_line_item';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Line Item
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * table which has the transaction
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * entry in table
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * FK to civicrm_contribution
+ *
+ * @var int unsigned
+ */
+ public $contribution_id;
+ /**
+ * FK to civicrm_price_field
+ *
+ * @var int unsigned
+ */
+ public $price_field_id;
+ /**
+ * descriptive label for item - from price_field_value.label
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * How many items ordered
+ *
+ * @var float
+ */
+ public $qty;
+ /**
+ * price of each item
+ *
+ * @var float
+ */
+ public $unit_price;
+ /**
+ * qty * unit_price
+ *
+ * @var float
+ */
+ public $line_total;
+ /**
+ * Participant count for field
+ *
+ * @var int unsigned
+ */
+ public $participant_count;
+ /**
+ * FK to civicrm_price_field_value
+ *
+ * @var int unsigned
+ */
+ public $price_field_value_id;
+ /**
+ * FK to Financial Type.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Tax-deductible portion of the amount
+ *
+ * @var float
+ */
+ public $deductible_amount;
+ /**
+ * tax of each item
+ *
+ * @var float
+ */
+ public $tax_amount;
+ /**
+ * class constructor
+ *
+ * @return civicrm_line_item
+ */
+ function __construct() {
+ $this->__table = 'civicrm_line_item';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'contribution_id', 'civicrm_contribution', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_field_id', 'civicrm_price_field', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_field_value_id', 'civicrm_price_field_value', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item ID') ,
+ 'description' => 'Line Item',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Line Item Entity Type') ,
+ 'description' => 'table which has the transaction',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item Entity') ,
+ 'description' => 'entry in table',
+ 'required' => true,
+ ) ,
+ 'contribution_id' => array(
+ 'name' => 'contribution_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item Contribution') ,
+ 'description' => 'FK to civicrm_contribution',
+ 'FKClassName' => 'CRM_Contribute_DAO_Contribution',
+ ) ,
+ 'price_field_id' => array(
+ 'name' => 'price_field_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item Price Field') ,
+ 'description' => 'FK to civicrm_price_field',
+ 'FKClassName' => 'CRM_Price_DAO_PriceField',
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Line Item Label') ,
+ 'description' => 'descriptive label for item - from price_field_value.label',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'qty' => array(
+ 'name' => 'qty',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Line Item Quantity') ,
+ 'description' => 'How many items ordered',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'unit_price' => array(
+ 'name' => 'unit_price',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Unit Price') ,
+ 'description' => 'price of each item',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'line_total' => array(
+ 'name' => 'line_total',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Line Item Total') ,
+ 'description' => 'qty * unit_price',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ ) ,
+ 'participant_count' => array(
+ 'name' => 'participant_count',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item Participant Count') ,
+ 'description' => 'Participant count for field',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'price_field_value_id' => array(
+ 'name' => 'price_field_value_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Line Item Option') ,
+ 'description' => 'FK to civicrm_price_field_value',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Price_DAO_PriceFieldValue',
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'deductible_amount' => array(
+ 'name' => 'deductible_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Deductible Amount') ,
+ 'description' => 'Tax-deductible portion of the amount',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'default' => '0.0',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'tax_amount' => array(
+ 'name' => 'tax_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Tax Amount') ,
+ 'description' => 'tax of each item',
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'import' => true,
+ 'where' => 'civicrm_line_item.tax_amount',
+ 'headerPattern' => '/tax(.?am(ou)?nt)?/i',
+ 'dataPattern' => '/^\d+(\.\d{2})?$/',
+ 'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'contribution_id' => 'contribution_id',
+ 'price_field_id' => 'price_field_id',
+ 'label' => 'label',
+ 'qty' => 'qty',
+ 'unit_price' => 'unit_price',
+ 'line_total' => 'line_total',
+ 'participant_count' => 'participant_count',
+ 'price_field_value_id' => 'price_field_value_id',
+ 'financial_type_id' => 'financial_type_id',
+ 'deductible_amount' => 'deductible_amount',
+ 'tax_amount' => 'tax_amount',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['line_item'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['line_item'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Price/PriceField.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:45f6d4bc486e94ff4f4bdff30c732c5a)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Price_DAO_PriceField extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_price_field';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Price Field
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_price_set
+ *
+ * @var int unsigned
+ */
+ public $price_set_id;
+ /**
+ * Variable name/programmatic handle for this field.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Text for form field label (also friendly name for administering this field).
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ *
+ * @var string
+ */
+ public $html_type;
+ /**
+ * Enter a quantity for this field?
+ *
+ * @var boolean
+ */
+ public $is_enter_qty;
+ /**
+ * Description and/or help text to display before this field.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Description and/or help text to display after this field.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Order in which the fields should appear
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * Should the price be displayed next to the label for each option?
+ *
+ * @var boolean
+ */
+ public $is_display_amounts;
+ /**
+ * number of options per line for checkbox and radio
+ *
+ * @var int unsigned
+ */
+ public $options_per_line;
+ /**
+ * Is this price field active
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Is this price field required (value must be > 1)
+ *
+ * @var boolean
+ */
+ public $is_required;
+ /**
+ * If non-zero, do not show this field before the date specified
+ *
+ * @var datetime
+ */
+ public $active_on;
+ /**
+ * If non-zero, do not show this field after the date specified
+ *
+ * @var datetime
+ */
+ public $expire_on;
+ /**
+ * Optional scripting attributes for field
+ *
+ * @var string
+ */
+ public $javascript;
+ /**
+ * Implicit FK to civicrm_option_group with name = 'visibility'
+ *
+ * @var int unsigned
+ */
+ public $visibility_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_price_field
+ */
+ function __construct() {
+ $this->__table = 'civicrm_price_field';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_set_id', 'civicrm_price_set', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Field ID') ,
+ 'description' => 'Price Field',
+ 'required' => true,
+ ) ,
+ 'price_set_id' => array(
+ 'name' => 'price_set_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Set') ,
+ 'description' => 'FK to civicrm_price_set',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Price_DAO_PriceSet',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Variable name/programmatic handle for this field.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label') ,
+ 'description' => 'Text for form field label (also friendly name for administering this field).',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'html_type' => array(
+ 'name' => 'html_type',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Html Type') ,
+ 'required' => true,
+ 'maxlength' => 12,
+ 'size' => CRM_Utils_Type::TWELVE,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Price_BAO_PriceField::htmlTypes',
+ )
+ ) ,
+ 'is_enter_qty' => array(
+ 'name' => 'is_enter_qty',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Field Quantity Required?') ,
+ 'description' => 'Enter a quantity for this field?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Price Field Pre Text') ,
+ 'description' => 'Description and/or help text to display before this field.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Price Field Post Text') ,
+ 'description' => 'Description and/or help text to display after this field.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Order in which the fields should appear',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'is_display_amounts' => array(
+ 'name' => 'is_display_amounts',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Field Show Amounts?') ,
+ 'description' => 'Should the price be displayed next to the label for each option?',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'options_per_line' => array(
+ 'name' => 'options_per_line',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Field Options per Row') ,
+ 'description' => 'number of options per line for checkbox and radio',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Field Is Active?') ,
+ 'description' => 'Is this price field active',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_required' => array(
+ 'name' => 'is_required',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Field is Required?') ,
+ 'description' => 'Is this price field required (value must be > 1)',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'active_on' => array(
+ 'name' => 'active_on',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Price Field Start Date') ,
+ 'description' => 'If non-zero, do not show this field before the date specified',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'expire_on' => array(
+ 'name' => 'expire_on',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Price Field End Date') ,
+ 'description' => 'If non-zero, do not show this field after the date specified',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'javascript' => array(
+ 'name' => 'javascript',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Price Field Javascript') ,
+ 'description' => 'Optional scripting attributes for field',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'visibility_id' => array(
+ 'name' => 'visibility_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Field Visibility') ,
+ 'description' => 'Implicit FK to civicrm_option_group with name = \'visibility\'',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'visibility',
+ 'optionEditPath' => 'civicrm/admin/options/visibility',
+ )
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'price_set_id' => 'price_set_id',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'html_type' => 'html_type',
+ 'is_enter_qty' => 'is_enter_qty',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'weight' => 'weight',
+ 'is_display_amounts' => 'is_display_amounts',
+ 'options_per_line' => 'options_per_line',
+ 'is_active' => 'is_active',
+ 'is_required' => 'is_required',
+ 'active_on' => 'active_on',
+ 'expire_on' => 'expire_on',
+ 'javascript' => 'javascript',
+ 'visibility_id' => 'visibility_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['price_field'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['price_field'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Price/PriceFieldValue.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:d54a5979efa1dc27bcd95ac8b0903f01)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_price_field_value';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Price Field Value
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * FK to civicrm_price_field
+ *
+ * @var int unsigned
+ */
+ public $price_field_id;
+ /**
+ * Price field option name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Price field option label
+ *
+ * @var string
+ */
+ public $label;
+ /**
+ * >Price field option description.
+ *
+ * @var text
+ */
+ public $description;
+ /**
+ * Price field option pre help text.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Price field option post field help.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Price field option amount
+ *
+ * @var string
+ */
+ public $amount;
+ /**
+ * Number of participants per field option
+ *
+ * @var int unsigned
+ */
+ public $count;
+ /**
+ * Max number of participants per field options
+ *
+ * @var int unsigned
+ */
+ public $max_value;
+ /**
+ * Order in which the field options should appear
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * FK to Membership Type
+ *
+ * @var int unsigned
+ */
+ public $membership_type_id;
+ /**
+ * Number of terms for this membership
+ *
+ * @var int unsigned
+ */
+ public $membership_num_terms;
+ /**
+ * Is this default price field option
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ * Is this price field value active
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * FK to Financial Type.
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Tax-deductible portion of the amount
+ *
+ * @var float
+ */
+ public $deductible_amount;
+ /**
+ * class constructor
+ *
+ * @return civicrm_price_field_value
+ */
+ function __construct() {
+ $this->__table = 'civicrm_price_field_value';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_field_id', 'civicrm_price_field', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'membership_type_id', 'civicrm_membership_type', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Field Value ID') ,
+ 'description' => 'Price Field Value',
+ 'required' => true,
+ ) ,
+ 'price_field_id' => array(
+ 'name' => 'price_field_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Field') ,
+ 'description' => 'FK to civicrm_price_field',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Price_DAO_PriceField',
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Price field option name',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'label' => array(
+ 'name' => 'label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Label') ,
+ 'description' => 'Price field option label',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Description') ,
+ 'description' => '>Price field option description.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Help Pre') ,
+ 'description' => 'Price field option pre help text.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Help Post') ,
+ 'description' => 'Price field option post field help.',
+ 'rows' => 2,
+ 'cols' => 60,
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'amount' => array(
+ 'name' => 'amount',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Amount') ,
+ 'description' => 'Price field option amount',
+ 'required' => true,
+ 'maxlength' => 512,
+ 'size' => 8,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'count' => array(
+ 'name' => 'count',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Count') ,
+ 'description' => 'Number of participants per field option',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'max_value' => array(
+ 'name' => 'max_value',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Max Value') ,
+ 'description' => 'Max number of participants per field options',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'description' => 'Order in which the field options should appear',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'membership_type_id' => array(
+ 'name' => 'membership_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Type') ,
+ 'description' => 'FK to Membership Type',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Member_DAO_MembershipType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'membership_num_terms' => array(
+ 'name' => 'membership_num_terms',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Membership Num Terms') ,
+ 'description' => 'Number of terms for this membership',
+ 'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Default Price Field Option?') ,
+ 'description' => 'Is this default price field option',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Field Value is Active') ,
+ 'description' => 'Is this price field value active',
+ 'default' => '1',
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type.',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'deductible_amount' => array(
+ 'name' => 'deductible_amount',
+ 'type' => CRM_Utils_Type::T_MONEY,
+ 'title' => ts('Deductible Amount') ,
+ 'description' => 'Tax-deductible portion of the amount',
+ 'required' => true,
+ 'precision' => array(
+ 20,
+ 2
+ ) ,
+ 'default' => '0.0',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'price_field_id' => 'price_field_id',
+ 'name' => 'name',
+ 'label' => 'label',
+ 'description' => 'description',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'amount' => 'amount',
+ 'count' => 'count',
+ 'max_value' => 'max_value',
+ 'weight' => 'weight',
+ 'membership_type_id' => 'membership_type_id',
+ 'membership_num_terms' => 'membership_num_terms',
+ 'is_default' => 'is_default',
+ 'is_active' => 'is_active',
+ 'financial_type_id' => 'financial_type_id',
+ 'deductible_amount' => 'deductible_amount',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['price_field_value'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['price_field_value'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Price/PriceSet.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:fa67d8a2e81e1d76e877e11b89022bd7)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Price_DAO_PriceSet extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_price_set';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Price Set
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this price-set for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Variable name/programmatic handle for this set of price fields.
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Displayed title for the Price Set.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * Is this price set active
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * Description and/or help text to display before fields in form.
+ *
+ * @var text
+ */
+ public $help_pre;
+ /**
+ * Description and/or help text to display after fields in form.
+ *
+ * @var text
+ */
+ public $help_post;
+ /**
+ * Optional Javascript script function(s) included on the form with this price_set. Can be used for conditional
+ *
+ * @var string
+ */
+ public $javascript;
+ /**
+ * What components are using this price set?
+ *
+ * @var string
+ */
+ public $extends;
+ /**
+ * FK to Financial Type(for membership price sets only).
+ *
+ * @var int unsigned
+ */
+ public $financial_type_id;
+ /**
+ * Is set if edited on Contribution or Event Page rather than through Manage Price Sets
+ *
+ * @var boolean
+ */
+ public $is_quick_config;
+ /**
+ * Is this a predefined system price set (i.e. it can not be deleted, edited)?
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_price_set
+ */
+ function __construct() {
+ $this->__table = 'civicrm_price_set';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'financial_type_id', 'civicrm_financial_type', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Set ID') ,
+ 'description' => 'Price Set',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Set Domain') ,
+ 'description' => 'Which Domain is this price-set for',
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Name') ,
+ 'description' => 'Variable name/programmatic handle for this set of price fields.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Price Set Title') ,
+ 'description' => 'Displayed title for the Price Set.',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Set Is Active?') ,
+ 'description' => 'Is this price set active',
+ 'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'help_pre' => array(
+ 'name' => 'help_pre',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Price Set Pre Help') ,
+ 'description' => 'Description and/or help text to display before fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'help_post' => array(
+ 'name' => 'help_post',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Price Set Post Help') ,
+ 'description' => 'Description and/or help text to display after fields in form.',
+ 'rows' => 4,
+ 'cols' => 80,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'javascript' => array(
+ 'name' => 'javascript',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Price Set Javascript') ,
+ 'description' => 'Optional Javascript script function(s) included on the form with this price_set. Can be used for conditional',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'extends' => array(
+ 'name' => 'extends',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Price Set Extends') ,
+ 'description' => 'What components are using this price set?',
+ 'required' => true,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_component',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'financial_type_id' => array(
+ 'name' => 'financial_type_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Financial Type') ,
+ 'description' => 'FK to Financial Type(for membership price sets only).',
+ 'default' => 'NULL',
+ 'FKClassName' => 'CRM_Financial_DAO_FinancialType',
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_financial_type',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'is_quick_config' => array(
+ 'name' => 'is_quick_config',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Is Price Set Quick Config?') ,
+ 'description' => 'Is set if edited on Contribution or Event Page rather than through Manage Price Sets',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Price Set Is Reserved') ,
+ 'description' => 'Is this a predefined system price set (i.e. it can not be deleted, edited)?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'is_active' => 'is_active',
+ 'help_pre' => 'help_pre',
+ 'help_post' => 'help_post',
+ 'javascript' => 'javascript',
+ 'extends' => 'extends',
+ 'financial_type_id' => 'financial_type_id',
+ 'is_quick_config' => 'is_quick_config',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return CRM_Core_DAO::getLocaleTableName(self::$_tableName);
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['price_set'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['price_set'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Price/PriceSetEntity.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:c43fb1fc017d318df33bb39a6026ce24)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Price_DAO_PriceSetEntity extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_price_set_entity';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = true;
+ /**
+ * Price Set Entity
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Table which uses this price set
+ *
+ * @var string
+ */
+ public $entity_table;
+ /**
+ * Item in table
+ *
+ * @var int unsigned
+ */
+ public $entity_id;
+ /**
+ * price set being used
+ *
+ * @var int unsigned
+ */
+ public $price_set_id;
+ /**
+ * class constructor
+ *
+ * @return civicrm_price_set_entity
+ */
+ function __construct() {
+ $this->__table = 'civicrm_price_set_entity';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'price_set_id', 'civicrm_price_set', 'id');
+ self::$_links[] = new CRM_Core_Reference_Dynamic(self::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Set Entity ID') ,
+ 'description' => 'Price Set Entity',
+ 'required' => true,
+ ) ,
+ 'entity_table' => array(
+ 'name' => 'entity_table',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Entity Table') ,
+ 'description' => 'Table which uses this price set',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'entity_id' => array(
+ 'name' => 'entity_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Entity IF') ,
+ 'description' => 'Item in table',
+ 'required' => true,
+ ) ,
+ 'price_set_id' => array(
+ 'name' => 'price_set_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Price Set') ,
+ 'description' => 'price set being used',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Price_DAO_PriceSet',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'entity_table' => 'entity_table',
+ 'entity_id' => 'entity_id',
+ 'price_set_id' => 'price_set_id',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['price_set_entity'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['price_set_entity'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Queue/QueueItem.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:670a6df6e6013dcbbe4b766b92fddf4c)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Queue_DAO_QueueItem extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_queue_item';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Name of the queue which includes this item
+ *
+ * @var string
+ */
+ public $queue_name;
+ /**
+ *
+ * @var int
+ */
+ public $weight;
+ /**
+ * date on which this item was submitted to the queue
+ *
+ * @var datetime
+ */
+ public $submit_time;
+ /**
+ * date on which this job becomes available; null if ASAP
+ *
+ * @var datetime
+ */
+ public $release_time;
+ /**
+ * Serialized queue
+ *
+ * @var text
+ */
+ public $data;
+ /**
+ * class constructor
+ *
+ * @return civicrm_queue_item
+ */
+ function __construct() {
+ $this->__table = 'civicrm_queue_item';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Queue ID') ,
+ 'required' => true,
+ ) ,
+ 'queue_name' => array(
+ 'name' => 'queue_name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Queue Name') ,
+ 'description' => 'Name of the queue which includes this item',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'weight' => array(
+ 'name' => 'weight',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Order') ,
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'submit_time' => array(
+ 'name' => 'submit_time',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Submit Time') ,
+ 'description' => 'date on which this item was submitted to the queue',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'release_time' => array(
+ 'name' => 'release_time',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ 'title' => ts('Release Time') ,
+ 'description' => 'date on which this job becomes available; null if ASAP',
+ 'html' => array(
+ 'type' => 'Select Date',
+ ) ,
+ ) ,
+ 'data' => array(
+ 'name' => 'data',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Queue item datas') ,
+ 'description' => 'Serialized queue',
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'queue_name' => 'queue_name',
+ 'weight' => 'weight',
+ 'submit_time' => 'submit_time',
+ 'release_time' => 'release_time',
+ 'data' => 'data',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['queue_item'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['queue_item'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/Report/ReportInstance.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:b5c3937c8c85b77a52b91145ede39e91)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_Report_DAO_ReportInstance extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_report_instance';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * Report Instance ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Which Domain is this instance for
+ *
+ * @var int unsigned
+ */
+ public $domain_id;
+ /**
+ * Report Instance Title.
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ * FK to civicrm_option_value for the report template
+ *
+ * @var string
+ */
+ public $report_id;
+ /**
+ * when combined with report_id/template uniquely identifies the instance
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * arguments that are passed in the url when invoking the instance
+ *
+ * @var string
+ */
+ public $args;
+ /**
+ * Report Instance description.
+ *
+ * @var string
+ */
+ public $description;
+ /**
+ * permission required to be able to run this instance
+ *
+ * @var string
+ */
+ public $permission;
+ /**
+ * role required to be able to run this instance
+ *
+ * @var string
+ */
+ public $grouprole;
+ /**
+ * Submitted form values for this report
+ *
+ * @var text
+ */
+ public $form_values;
+ /**
+ * Is this entry active?
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * FK to contact table.
+ *
+ * @var int unsigned
+ */
+ public $created_id;
+ /**
+ * FK to contact table.
+ *
+ * @var int unsigned
+ */
+ public $owner_id;
+ /**
+ * Subject of email
+ *
+ * @var string
+ */
+ public $email_subject;
+ /**
+ * comma-separated list of email addresses to send the report to
+ *
+ * @var text
+ */
+ public $email_to;
+ /**
+ * comma-separated list of email addresses to send the report to
+ *
+ * @var text
+ */
+ public $email_cc;
+ /**
+ * comma-separated list of email addresses to send the report to
+ *
+ * @var text
+ */
+ public $header;
+ /**
+ * comma-separated list of email addresses to send the report to
+ *
+ * @var text
+ */
+ public $footer;
+ /**
+ * FK to navigation ID
+ *
+ * @var int unsigned
+ */
+ public $navigation_id;
+ /**
+ * FK to instance ID drilldown to
+ *
+ * @var int unsigned
+ */
+ public $drilldown_id;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_reserved;
+ /**
+ * class constructor
+ *
+ * @return civicrm_report_instance
+ */
+ function __construct() {
+ $this->__table = 'civicrm_report_instance';
+ parent::__construct();
+ }
+ /**
+ * Returns foreign keys and entity references
+ *
+ * @return array
+ * [CRM_Core_Reference_Interface]
+ */
+ static function getReferenceColumns() {
+ if (!self::$_links) {
+ self::$_links = static ::createReferenceColumns(__CLASS__);
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'created_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'owner_id', 'civicrm_contact', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'navigation_id', 'civicrm_navigation', 'id');
+ self::$_links[] = new CRM_Core_Reference_Basic(self::getTableName() , 'drilldown_id', 'civicrm_report_instance', 'id');
+ }
+ return self::$_links;
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Report Instance ID') ,
+ 'description' => 'Report Instance ID',
+ 'required' => true,
+ ) ,
+ 'domain_id' => array(
+ 'name' => 'domain_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Report Instance Domain ID') ,
+ 'description' => 'Which Domain is this instance for',
+ 'required' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Domain',
+ 'pseudoconstant' => array(
+ 'table' => 'civicrm_domain',
+ 'keyColumn' => 'id',
+ 'labelColumn' => 'name',
+ )
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance Title') ,
+ 'description' => 'Report Instance Title.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'report_id' => array(
+ 'name' => 'report_id',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report template ID') ,
+ 'description' => 'FK to civicrm_option_value for the report template',
+ 'required' => true,
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report instance Name') ,
+ 'description' => 'when combined with report_id/template uniquely identifies the instance',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'args' => array(
+ 'name' => 'args',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance Arguments') ,
+ 'description' => 'arguments that are passed in the url when invoking the instance',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'description' => array(
+ 'name' => 'description',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance description') ,
+ 'description' => 'Report Instance description.',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'permission' => array(
+ 'name' => 'permission',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance Permissions') ,
+ 'description' => 'permission required to be able to run this instance',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'grouprole' => array(
+ 'name' => 'grouprole',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance Assigned to Roles') ,
+ 'description' => 'role required to be able to run this instance',
+ 'maxlength' => 1024,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'form_values' => array(
+ 'name' => 'form_values',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Submitted Form Values') ,
+ 'description' => 'Submitted form values for this report',
+ 'import' => true,
+ 'where' => 'civicrm_report_instance.form_values',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Report Instance is Active') ,
+ 'description' => 'Is this entry active?',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'created_id' => array(
+ 'name' => 'created_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Report Instance Created By') ,
+ 'description' => 'FK to contact table.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'owner_id' => array(
+ 'name' => 'owner_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Report Instance Owned By') ,
+ 'description' => 'FK to contact table.',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ) ,
+ 'email_subject' => array(
+ 'name' => 'email_subject',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('Report Instance email Subject') ,
+ 'description' => 'Subject of email',
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'email_to' => array(
+ 'name' => 'email_to',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Email Report Instance To') ,
+ 'description' => 'comma-separated list of email addresses to send the report to',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'email_cc' => array(
+ 'name' => 'email_cc',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('cc Email Report Instance To') ,
+ 'description' => 'comma-separated list of email addresses to send the report to',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'header' => array(
+ 'name' => 'header',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Report Instance Header') ,
+ 'description' => 'comma-separated list of email addresses to send the report to',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'footer' => array(
+ 'name' => 'footer',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('Report Instance Footer') ,
+ 'description' => 'comma-separated list of email addresses to send the report to',
+ 'rows' => 4,
+ 'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ) ,
+ ) ,
+ 'navigation_id' => array(
+ 'name' => 'navigation_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Navigation ID') ,
+ 'description' => 'FK to navigation ID',
+ 'import' => true,
+ 'where' => 'civicrm_report_instance.navigation_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Core_DAO_Navigation',
+ ) ,
+ 'drilldown_id' => array(
+ 'name' => 'drilldown_id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('Drilldown Report ID') ,
+ 'description' => 'FK to instance ID drilldown to',
+ 'import' => true,
+ 'where' => 'civicrm_report_instance.drilldown_id',
+ 'headerPattern' => '',
+ 'dataPattern' => '',
+ 'export' => true,
+ 'FKClassName' => 'CRM_Report_DAO_ReportInstance',
+ ) ,
+ 'is_reserved' => array(
+ 'name' => 'is_reserved',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('Instance is Reserved') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'domain_id' => 'domain_id',
+ 'title' => 'title',
+ 'report_id' => 'report_id',
+ 'name' => 'name',
+ 'args' => 'args',
+ 'description' => 'description',
+ 'permission' => 'permission',
+ 'grouprole' => 'grouprole',
+ 'form_values' => 'form_values',
+ 'is_active' => 'is_active',
+ 'created_id' => 'created_id',
+ 'owner_id' => 'owner_id',
+ 'email_subject' => 'email_subject',
+ 'email_to' => 'email_to',
+ 'email_cc' => 'email_cc',
+ 'header' => 'header',
+ 'footer' => 'footer',
+ 'navigation_id' => 'navigation_id',
+ 'drilldown_id' => 'drilldown_id',
+ 'is_reserved' => 'is_reserved',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['report_instance'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['report_instance'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}
--- /dev/null
+<?php
+/*
++--------------------------------------------------------------------+
+| CiviCRM version 4.7 |
++--------------------------------------------------------------------+
+| Copyright CiviCRM LLC (c) 2004-2016 |
++--------------------------------------------------------------------+
+| This file is a part of CiviCRM. |
+| |
+| CiviCRM is free software; you can copy, modify, and distribute it |
+| under the terms of the GNU Affero General Public License |
+| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
+| |
+| CiviCRM is distributed in the hope that it will be useful, but |
+| WITHOUT ANY WARRANTY; without even the implied warranty of |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
+| See the GNU Affero General Public License for more details. |
+| |
+| You should have received a copy of the GNU Affero General Public |
+| License and the CiviCRM Licensing Exception along |
+| with this program; if not, contact CiviCRM LLC |
+| at info[AT]civicrm[DOT]org. If you have questions about the |
+| GNU Affero General Public License or the licensing of CiviCRM, |
+| see the CiviCRM license FAQ at http://civicrm.org/licensing |
++--------------------------------------------------------------------+
+*/
+/**
+ * @package CRM
+ * @copyright CiviCRM LLC (c) 2004-2016
+ *
+ * Generated from xml/schema/CRM/SMS/Provider.xml
+ * DO NOT EDIT. Generated by CRM_Core_CodeGen
+ * (GenCodeChecksum:1674e39e06d833703965eb45197e6690)
+ */
+require_once 'CRM/Core/DAO.php';
+require_once 'CRM/Utils/Type.php';
+class CRM_SMS_DAO_Provider extends CRM_Core_DAO {
+ /**
+ * static instance to hold the table name
+ *
+ * @var string
+ */
+ static $_tableName = 'civicrm_sms_provider';
+ /**
+ * static instance to hold the field values
+ *
+ * @var array
+ */
+ static $_fields = null;
+ /**
+ * static instance to hold the keys used in $_fields for each field.
+ *
+ * @var array
+ */
+ static $_fieldKeys = null;
+ /**
+ * static instance to hold the FK relationships
+ *
+ * @var string
+ */
+ static $_links = null;
+ /**
+ * static instance to hold the values that can
+ * be imported
+ *
+ * @var array
+ */
+ static $_import = null;
+ /**
+ * static instance to hold the values that can
+ * be exported
+ *
+ * @var array
+ */
+ static $_export = null;
+ /**
+ * static value to see if we should log any modifications to
+ * this table in the civicrm_log table
+ *
+ * @var boolean
+ */
+ static $_log = false;
+ /**
+ * SMS Provider ID
+ *
+ * @var int unsigned
+ */
+ public $id;
+ /**
+ * Provider internal name points to option_value of option_group sms_provider_name
+ *
+ * @var string
+ */
+ public $name;
+ /**
+ * Provider name visible to user
+ *
+ * @var string
+ */
+ public $title;
+ /**
+ *
+ * @var string
+ */
+ public $username;
+ /**
+ *
+ * @var string
+ */
+ public $password;
+ /**
+ * points to value in civicrm_option_value for group sms_api_type
+ *
+ * @var int unsigned
+ */
+ public $api_type;
+ /**
+ *
+ * @var string
+ */
+ public $api_url;
+ /**
+ * the api params in xml, http or smtp format
+ *
+ * @var text
+ */
+ public $api_params;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_default;
+ /**
+ *
+ * @var boolean
+ */
+ public $is_active;
+ /**
+ * class constructor
+ *
+ * @return civicrm_sms_provider
+ */
+ function __construct() {
+ $this->__table = 'civicrm_sms_provider';
+ parent::__construct();
+ }
+ /**
+ * Returns all the column names of this table
+ *
+ * @return array
+ */
+ static function &fields() {
+ if (!(self::$_fields)) {
+ self::$_fields = array(
+ 'id' => array(
+ 'name' => 'id',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('SMS Provider ID') ,
+ 'description' => 'SMS Provider ID',
+ 'required' => true,
+ ) ,
+ 'name' => array(
+ 'name' => 'name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SMS Provider Name') ,
+ 'description' => 'Provider internal name points to option_value of option_group sms_provider_name',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ ) ,
+ 'title' => array(
+ 'name' => 'title',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SMS Provider Title') ,
+ 'description' => 'Provider name visible to user',
+ 'maxlength' => 64,
+ 'size' => CRM_Utils_Type::BIG,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'username' => array(
+ 'name' => 'username',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SMS Provider Username') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'password' => array(
+ 'name' => 'password',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SMS Provider Password') ,
+ 'maxlength' => 255,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'api_type' => array(
+ 'name' => 'api_type',
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => ts('SMS Provider API') ,
+ 'description' => 'points to value in civicrm_option_value for group sms_api_type',
+ 'required' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ) ,
+ ) ,
+ 'api_url' => array(
+ 'name' => 'api_url',
+ 'type' => CRM_Utils_Type::T_STRING,
+ 'title' => ts('SMS Provider API URL') ,
+ 'maxlength' => 128,
+ 'size' => CRM_Utils_Type::HUGE,
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'api_params' => array(
+ 'name' => 'api_params',
+ 'type' => CRM_Utils_Type::T_TEXT,
+ 'title' => ts('SMS Provider API Params') ,
+ 'description' => 'the api params in xml, http or smtp format',
+ 'html' => array(
+ 'type' => 'Text',
+ ) ,
+ ) ,
+ 'is_default' => array(
+ 'name' => 'is_default',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('SMS Provider is Default?') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ 'is_active' => array(
+ 'name' => 'is_active',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => ts('SMS Provider is Active?') ,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ) ,
+ ) ,
+ );
+ }
+ return self::$_fields;
+ }
+ /**
+ * Returns an array containing, for each field, the arary key used for that
+ * field in self::$_fields.
+ *
+ * @return array
+ */
+ static function &fieldKeys() {
+ if (!(self::$_fieldKeys)) {
+ self::$_fieldKeys = array(
+ 'id' => 'id',
+ 'name' => 'name',
+ 'title' => 'title',
+ 'username' => 'username',
+ 'password' => 'password',
+ 'api_type' => 'api_type',
+ 'api_url' => 'api_url',
+ 'api_params' => 'api_params',
+ 'is_default' => 'is_default',
+ 'is_active' => 'is_active',
+ );
+ }
+ return self::$_fieldKeys;
+ }
+ /**
+ * Returns the names of this table
+ *
+ * @return string
+ */
+ static function getTableName() {
+ return self::$_tableName;
+ }
+ /**
+ * Returns if this table needs to be logged
+ *
+ * @return boolean
+ */
+ function getLog() {
+ return self::$_log;
+ }
+ /**
+ * Returns the list of fields that can be imported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &import($prefix = false) {
+ if (!(self::$_import)) {
+ self::$_import = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('import', $field)) {
+ if ($prefix) {
+ self::$_import['sms_provider'] = & $fields[$name];
+ } else {
+ self::$_import[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_import;
+ }
+ /**
+ * Returns the list of fields that can be exported
+ *
+ * @param bool $prefix
+ *
+ * @return array
+ */
+ static function &export($prefix = false) {
+ if (!(self::$_export)) {
+ self::$_export = array();
+ $fields = self::fields();
+ foreach($fields as $name => $field) {
+ if (CRM_Utils_Array::value('export', $field)) {
+ if ($prefix) {
+ self::$_export['sms_provider'] = & $fields[$name];
+ } else {
+ self::$_export[$name] = & $fields[$name];
+ }
+ }
+ }
+ }
+ return self::$_export;
+ }
+}