5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/UFMatch.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:4fca2151c2ecbd762ac9e2f067f0030f)
13 * Database access object for the UFMatch entity.
15 class CRM_Core_DAO_UFMatch
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.1';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_uf_match';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = TRUE;
34 * System generated ID.
41 * Which Domain is this match entry for
69 * UI language preferred by the given user/contact
78 public function __construct() {
79 $this->__table
= 'civicrm_uf_match';
80 parent
::__construct();
84 * Returns localized title of this entity.
86 public static function getEntityTitle() {
87 return ts('UFMatches');
91 * Returns foreign keys and entity references.
94 * [CRM_Core_Reference_Interface]
96 public static function getReferenceColumns() {
97 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
98 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
99 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
100 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contact_id', 'civicrm_contact', 'id');
101 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
103 return Civi
::$statics[__CLASS__
]['links'];
107 * Returns all the column names of this table
111 public static function &fields() {
112 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
113 Civi
::$statics[__CLASS__
]['fields'] = [
116 'type' => CRM_Utils_Type
::T_INT
,
117 'title' => ts('UF Match ID'),
118 'description' => ts('System generated ID.'),
120 'where' => 'civicrm_uf_match.id',
121 'table_name' => 'civicrm_uf_match',
122 'entity' => 'UFMatch',
123 'bao' => 'CRM_Core_BAO_UFMatch',
128 'name' => 'domain_id',
129 'type' => CRM_Utils_Type
::T_INT
,
130 'title' => ts('UF Match Domain ID'),
131 'description' => ts('Which Domain is this match entry for'),
133 'where' => 'civicrm_uf_match.domain_id',
134 'table_name' => 'civicrm_uf_match',
135 'entity' => 'UFMatch',
136 'bao' => 'CRM_Core_BAO_UFMatch',
138 'FKClassName' => 'CRM_Core_DAO_Domain',
139 'pseudoconstant' => [
140 'table' => 'civicrm_domain',
142 'labelColumn' => 'name',
148 'type' => CRM_Utils_Type
::T_INT
,
149 'title' => ts('CMS ID'),
150 'description' => ts('UF ID'),
152 'where' => 'civicrm_uf_match.uf_id',
153 'table_name' => 'civicrm_uf_match',
154 'entity' => 'UFMatch',
155 'bao' => 'CRM_Core_BAO_UFMatch',
161 'type' => CRM_Utils_Type
::T_STRING
,
162 'title' => ts('CMS Unique Identifier'),
163 'description' => ts('UF Name'),
165 'size' => CRM_Utils_Type
::HUGE
,
166 'where' => 'civicrm_uf_match.uf_name',
167 'table_name' => 'civicrm_uf_match',
168 'entity' => 'UFMatch',
169 'bao' => 'CRM_Core_BAO_UFMatch',
171 'add' => '1.9.kabissa',
174 'name' => 'contact_id',
175 'type' => CRM_Utils_Type
::T_INT
,
176 'title' => ts('CiviCRM Contact ID'),
177 'description' => ts('FK to Contact ID'),
178 'where' => 'civicrm_uf_match.contact_id',
179 'table_name' => 'civicrm_uf_match',
180 'entity' => 'UFMatch',
181 'bao' => 'CRM_Core_BAO_UFMatch',
183 'FKClassName' => 'CRM_Contact_DAO_Contact',
187 'name' => 'language',
188 'type' => CRM_Utils_Type
::T_STRING
,
189 'title' => ts('Preferred Language'),
190 'description' => ts('UI language preferred by the given user/contact'),
192 'size' => CRM_Utils_Type
::SIX
,
193 'where' => 'civicrm_uf_match.language',
194 'table_name' => 'civicrm_uf_match',
195 'entity' => 'UFMatch',
196 'bao' => 'CRM_Core_BAO_UFMatch',
201 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
203 return Civi
::$statics[__CLASS__
]['fields'];
207 * Return a mapping from field-name to the corresponding key (as used in fields()).
210 * Array(string $name => string $uniqueName).
212 public static function &fieldKeys() {
213 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
214 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
216 return Civi
::$statics[__CLASS__
]['fieldKeys'];
220 * Returns the names of this table
224 public static function getTableName() {
225 return self
::$_tableName;
229 * Returns if this table needs to be logged
233 public function getLog() {
238 * Returns the list of fields that can be imported
240 * @param bool $prefix
244 public static function &import($prefix = FALSE) {
245 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_match', $prefix, []);
250 * Returns the list of fields that can be exported
252 * @param bool $prefix
256 public static function &export($prefix = FALSE) {
257 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_match', $prefix, []);
262 * Returns the list of indices
264 * @param bool $localize
268 public static function indices($localize = TRUE) {
270 'I_civicrm_uf_match_uf_id' => [
271 'name' => 'I_civicrm_uf_match_uf_id',
275 'localizable' => FALSE,
276 'sig' => 'civicrm_uf_match::0::uf_id',
278 'UI_uf_name_domain_id' => [
279 'name' => 'UI_uf_name_domain_id',
284 'localizable' => FALSE,
286 'sig' => 'civicrm_uf_match::1::uf_name::domain_id',
288 'UI_contact_domain_id' => [
289 'name' => 'UI_contact_domain_id',
294 'localizable' => FALSE,
296 'sig' => 'civicrm_uf_match::1::contact_id::domain_id',
299 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;