3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/UFMatch.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:3918388730a704a411f3b1daf2cdfded)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_UFMatch
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_uf_match';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
84 * System generated ID.
90 * Which Domain is this match entry for
114 * UI language preferred by the given user/contact
122 * @return civicrm_uf_match
124 function __construct() {
125 $this->__table
= 'civicrm_uf_match';
126 parent
::__construct();
129 * Returns foreign keys and entity references
132 * [CRM_Core_Reference_Interface]
134 static function getReferenceColumns() {
135 if (!self
::$_links) {
136 self
::$_links = static ::createReferenceColumns(__CLASS__
);
137 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
138 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'contact_id', 'civicrm_contact', 'id');
140 return self
::$_links;
143 * Returns all the column names of this table
147 static function &fields() {
148 if (!(self
::$_fields)) {
149 self
::$_fields = array(
152 'type' => CRM_Utils_Type
::T_INT
,
153 'title' => ts('UF Match ID') ,
154 'description' => 'System generated ID.',
157 'domain_id' => array(
158 'name' => 'domain_id',
159 'type' => CRM_Utils_Type
::T_INT
,
160 'title' => ts('UF Match Domain ID') ,
161 'description' => 'Which Domain is this match entry for',
163 'FKClassName' => 'CRM_Core_DAO_Domain',
164 'pseudoconstant' => array(
165 'table' => 'civicrm_domain',
167 'labelColumn' => 'name',
172 'type' => CRM_Utils_Type
::T_INT
,
173 'title' => ts('CMS ID') ,
174 'description' => 'UF ID',
179 'type' => CRM_Utils_Type
::T_STRING
,
180 'title' => ts('CMS Unique Identifier') ,
181 'description' => 'UF Name',
183 'size' => CRM_Utils_Type
::HUGE
,
185 'contact_id' => array(
186 'name' => 'contact_id',
187 'type' => CRM_Utils_Type
::T_INT
,
188 'title' => ts('CiviCRM Contact ID') ,
189 'description' => 'FK to Contact ID',
190 'FKClassName' => 'CRM_Contact_DAO_Contact',
193 'name' => 'language',
194 'type' => CRM_Utils_Type
::T_STRING
,
195 'title' => ts('Preferred Language') ,
196 'description' => 'UI language preferred by the given user/contact',
198 'size' => CRM_Utils_Type
::SIX
,
202 return self
::$_fields;
205 * Returns an array containing, for each field, the arary key used for that
206 * field in self::$_fields.
210 static function &fieldKeys() {
211 if (!(self
::$_fieldKeys)) {
212 self
::$_fieldKeys = array(
214 'domain_id' => 'domain_id',
216 'uf_name' => 'uf_name',
217 'contact_id' => 'contact_id',
218 'language' => 'language',
221 return self
::$_fieldKeys;
224 * Returns the names of this table
228 static function getTableName() {
229 return self
::$_tableName;
232 * Returns if this table needs to be logged
240 * Returns the list of fields that can be imported
242 * @param bool $prefix
246 static function &import($prefix = false) {
247 if (!(self
::$_import)) {
248 self
::$_import = array();
249 $fields = self
::fields();
250 foreach($fields as $name => $field) {
251 if (CRM_Utils_Array
::value('import', $field)) {
253 self
::$_import['uf_match'] = & $fields[$name];
255 self
::$_import[$name] = & $fields[$name];
260 return self
::$_import;
263 * Returns the list of fields that can be exported
265 * @param bool $prefix
269 static function &export($prefix = false) {
270 if (!(self
::$_export)) {
271 self
::$_export = array();
272 $fields = self
::fields();
273 foreach($fields as $name => $field) {
274 if (CRM_Utils_Array
::value('export', $field)) {
276 self
::$_export['uf_match'] = & $fields[$name];
278 self
::$_export[$name] = & $fields[$name];
283 return self
::$_export;