3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Core/UFMatch.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:7a4ca7be149cba37dc9cfb8c2885989c)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_UFMatch constructor.
40 class CRM_Core_DAO_UFMatch
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_uf_match';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * System generated ID.
60 * Which Domain is this match entry for
84 * UI language preferred by the given user/contact
92 function __construct() {
93 $this->__table
= 'civicrm_uf_match';
94 parent
::__construct();
97 * Returns foreign keys and entity references.
100 * [CRM_Core_Reference_Interface]
102 static function getReferenceColumns() {
103 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
104 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
105 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
106 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
107 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
109 return Civi
::$statics[__CLASS__
]['links'];
112 * Returns all the column names of this table
116 static function &fields() {
117 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
118 Civi
::$statics[__CLASS__
]['fields'] = array(
121 'type' => CRM_Utils_Type
::T_INT
,
122 'title' => ts('UF Match ID') ,
123 'description' => 'System generated ID.',
125 'table_name' => 'civicrm_uf_match',
126 'entity' => 'UFMatch',
127 'bao' => 'CRM_Core_BAO_UFMatch',
129 'domain_id' => array(
130 'name' => 'domain_id',
131 'type' => CRM_Utils_Type
::T_INT
,
132 'title' => ts('UF Match Domain ID') ,
133 'description' => 'Which Domain is this match entry for',
135 'table_name' => 'civicrm_uf_match',
136 'entity' => 'UFMatch',
137 'bao' => 'CRM_Core_BAO_UFMatch',
138 'FKClassName' => 'CRM_Core_DAO_Domain',
139 'pseudoconstant' => array(
140 'table' => 'civicrm_domain',
142 'labelColumn' => 'name',
147 'type' => CRM_Utils_Type
::T_INT
,
148 'title' => ts('CMS ID') ,
149 'description' => 'UF ID',
151 'table_name' => 'civicrm_uf_match',
152 'entity' => 'UFMatch',
153 'bao' => 'CRM_Core_BAO_UFMatch',
157 'type' => CRM_Utils_Type
::T_STRING
,
158 'title' => ts('CMS Unique Identifier') ,
159 'description' => 'UF Name',
161 'size' => CRM_Utils_Type
::HUGE
,
162 'table_name' => 'civicrm_uf_match',
163 'entity' => 'UFMatch',
164 'bao' => 'CRM_Core_BAO_UFMatch',
166 'contact_id' => array(
167 'name' => 'contact_id',
168 'type' => CRM_Utils_Type
::T_INT
,
169 'title' => ts('CiviCRM Contact ID') ,
170 'description' => 'FK to Contact ID',
171 'table_name' => 'civicrm_uf_match',
172 'entity' => 'UFMatch',
173 'bao' => 'CRM_Core_BAO_UFMatch',
174 'FKClassName' => 'CRM_Contact_DAO_Contact',
177 'name' => 'language',
178 'type' => CRM_Utils_Type
::T_STRING
,
179 'title' => ts('Preferred Language') ,
180 'description' => 'UI language preferred by the given user/contact',
182 'size' => CRM_Utils_Type
::SIX
,
183 'table_name' => 'civicrm_uf_match',
184 'entity' => 'UFMatch',
185 'bao' => 'CRM_Core_BAO_UFMatch',
188 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
190 return Civi
::$statics[__CLASS__
]['fields'];
193 * Return a mapping from field-name to the corresponding key (as used in fields()).
196 * Array(string $name => string $uniqueName).
198 static function &fieldKeys() {
199 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
200 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
202 return Civi
::$statics[__CLASS__
]['fieldKeys'];
205 * Returns the names of this table
209 static function getTableName() {
210 return self
::$_tableName;
213 * Returns if this table needs to be logged
221 * Returns the list of fields that can be imported
223 * @param bool $prefix
227 static function &import($prefix = false) {
228 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_match', $prefix, array());
232 * Returns the list of fields that can be exported
234 * @param bool $prefix
238 static function &export($prefix = false) {
239 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_match', $prefix, array());