5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Core/UFMatch.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:3dbbb5d21dec55536826e465629f7174)
13 * Database access object for the UFMatch entity.
15 class CRM_Core_DAO_UFMatch
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 static $_tableName = 'civicrm_uf_match';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 * System generated ID.
39 * Which Domain is this match entry for
67 * UI language preferred by the given user/contact
76 public function __construct() {
77 $this->__table
= 'civicrm_uf_match';
78 parent
::__construct();
82 * Returns foreign keys and entity references.
85 * [CRM_Core_Reference_Interface]
87 public static function getReferenceColumns() {
88 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
89 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
90 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
91 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contact_id', 'civicrm_contact', 'id');
92 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
94 return Civi
::$statics[__CLASS__
]['links'];
98 * Returns all the column names of this table
102 public static function &fields() {
103 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
104 Civi
::$statics[__CLASS__
]['fields'] = [
107 'type' => CRM_Utils_Type
::T_INT
,
108 'title' => ts('UF Match ID'),
109 'description' => ts('System generated ID.'),
111 'table_name' => 'civicrm_uf_match',
112 'entity' => 'UFMatch',
113 'bao' => 'CRM_Core_BAO_UFMatch',
117 'name' => 'domain_id',
118 'type' => CRM_Utils_Type
::T_INT
,
119 'title' => ts('UF Match Domain ID'),
120 'description' => ts('Which Domain is this match entry for'),
122 'table_name' => 'civicrm_uf_match',
123 'entity' => 'UFMatch',
124 'bao' => 'CRM_Core_BAO_UFMatch',
126 'FKClassName' => 'CRM_Core_DAO_Domain',
127 'pseudoconstant' => [
128 'table' => 'civicrm_domain',
130 'labelColumn' => 'name',
135 'type' => CRM_Utils_Type
::T_INT
,
136 'title' => ts('CMS ID'),
137 'description' => ts('UF ID'),
139 'table_name' => 'civicrm_uf_match',
140 'entity' => 'UFMatch',
141 'bao' => 'CRM_Core_BAO_UFMatch',
146 'type' => CRM_Utils_Type
::T_STRING
,
147 'title' => ts('CMS Unique Identifier'),
148 'description' => ts('UF Name'),
150 'size' => CRM_Utils_Type
::HUGE
,
151 'table_name' => 'civicrm_uf_match',
152 'entity' => 'UFMatch',
153 'bao' => 'CRM_Core_BAO_UFMatch',
157 'name' => 'contact_id',
158 'type' => CRM_Utils_Type
::T_INT
,
159 'title' => ts('CiviCRM Contact ID'),
160 'description' => ts('FK to Contact ID'),
161 'table_name' => 'civicrm_uf_match',
162 'entity' => 'UFMatch',
163 'bao' => 'CRM_Core_BAO_UFMatch',
165 'FKClassName' => 'CRM_Contact_DAO_Contact',
168 'name' => 'language',
169 'type' => CRM_Utils_Type
::T_STRING
,
170 'title' => ts('Preferred Language'),
171 'description' => ts('UI language preferred by the given user/contact'),
173 'size' => CRM_Utils_Type
::SIX
,
174 'table_name' => 'civicrm_uf_match',
175 'entity' => 'UFMatch',
176 'bao' => 'CRM_Core_BAO_UFMatch',
180 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
182 return Civi
::$statics[__CLASS__
]['fields'];
186 * Return a mapping from field-name to the corresponding key (as used in fields()).
189 * Array(string $name => string $uniqueName).
191 public static function &fieldKeys() {
192 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
193 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
195 return Civi
::$statics[__CLASS__
]['fieldKeys'];
199 * Returns the names of this table
203 public static function getTableName() {
204 return self
::$_tableName;
208 * Returns if this table needs to be logged
212 public function getLog() {
217 * Returns the list of fields that can be imported
219 * @param bool $prefix
223 public static function &import($prefix = FALSE) {
224 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_match', $prefix, []);
229 * Returns the list of fields that can be exported
231 * @param bool $prefix
235 public static function &export($prefix = FALSE) {
236 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_match', $prefix, []);
241 * Returns the list of indices
243 * @param bool $localize
247 public static function indices($localize = TRUE) {
249 'I_civicrm_uf_match_uf_id' => [
250 'name' => 'I_civicrm_uf_match_uf_id',
254 'localizable' => FALSE,
255 'sig' => 'civicrm_uf_match::0::uf_id',
257 'UI_uf_name_domain_id' => [
258 'name' => 'UI_uf_name_domain_id',
263 'localizable' => FALSE,
265 'sig' => 'civicrm_uf_match::1::uf_name::domain_id',
267 'UI_contact_domain_id' => [
268 'name' => 'UI_contact_domain_id',
273 'localizable' => FALSE,
275 'sig' => 'civicrm_uf_match::1::contact_id::domain_id',
278 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;