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:7ce4fe9f5303456e336af537ec214114)
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 public static $_tableName = 'civicrm_uf_match';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
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 localized title of this entity.
84 public static function getEntityTitle() {
85 return ts('UFMatches');
89 * Returns foreign keys and entity references.
92 * [CRM_Core_Reference_Interface]
94 public static function getReferenceColumns() {
95 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
96 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
97 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
98 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'contact_id', 'civicrm_contact', 'id');
99 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
101 return Civi
::$statics[__CLASS__
]['links'];
105 * Returns all the column names of this table
109 public static function &fields() {
110 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
111 Civi
::$statics[__CLASS__
]['fields'] = [
114 'type' => CRM_Utils_Type
::T_INT
,
115 'title' => ts('UF Match ID'),
116 'description' => ts('System generated ID.'),
118 'where' => 'civicrm_uf_match.id',
119 'table_name' => 'civicrm_uf_match',
120 'entity' => 'UFMatch',
121 'bao' => 'CRM_Core_BAO_UFMatch',
125 'name' => 'domain_id',
126 'type' => CRM_Utils_Type
::T_INT
,
127 'title' => ts('UF Match Domain ID'),
128 'description' => ts('Which Domain is this match entry for'),
130 'where' => 'civicrm_uf_match.domain_id',
131 'table_name' => 'civicrm_uf_match',
132 'entity' => 'UFMatch',
133 'bao' => 'CRM_Core_BAO_UFMatch',
135 'FKClassName' => 'CRM_Core_DAO_Domain',
136 'pseudoconstant' => [
137 'table' => 'civicrm_domain',
139 'labelColumn' => 'name',
144 'type' => CRM_Utils_Type
::T_INT
,
145 'title' => ts('CMS ID'),
146 'description' => ts('UF ID'),
148 'where' => 'civicrm_uf_match.uf_id',
149 'table_name' => 'civicrm_uf_match',
150 'entity' => 'UFMatch',
151 'bao' => 'CRM_Core_BAO_UFMatch',
156 'type' => CRM_Utils_Type
::T_STRING
,
157 'title' => ts('CMS Unique Identifier'),
158 'description' => ts('UF Name'),
160 'size' => CRM_Utils_Type
::HUGE
,
161 'where' => 'civicrm_uf_match.uf_name',
162 'table_name' => 'civicrm_uf_match',
163 'entity' => 'UFMatch',
164 'bao' => 'CRM_Core_BAO_UFMatch',
168 'name' => 'contact_id',
169 'type' => CRM_Utils_Type
::T_INT
,
170 'title' => ts('CiviCRM Contact ID'),
171 'description' => ts('FK to Contact ID'),
172 'where' => 'civicrm_uf_match.contact_id',
173 'table_name' => 'civicrm_uf_match',
174 'entity' => 'UFMatch',
175 'bao' => 'CRM_Core_BAO_UFMatch',
177 'FKClassName' => 'CRM_Contact_DAO_Contact',
180 'name' => 'language',
181 'type' => CRM_Utils_Type
::T_STRING
,
182 'title' => ts('Preferred Language'),
183 'description' => ts('UI language preferred by the given user/contact'),
185 'size' => CRM_Utils_Type
::SIX
,
186 'where' => 'civicrm_uf_match.language',
187 'table_name' => 'civicrm_uf_match',
188 'entity' => 'UFMatch',
189 'bao' => 'CRM_Core_BAO_UFMatch',
193 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
195 return Civi
::$statics[__CLASS__
]['fields'];
199 * Return a mapping from field-name to the corresponding key (as used in fields()).
202 * Array(string $name => string $uniqueName).
204 public static function &fieldKeys() {
205 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
206 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
208 return Civi
::$statics[__CLASS__
]['fieldKeys'];
212 * Returns the names of this table
216 public static function getTableName() {
217 return self
::$_tableName;
221 * Returns if this table needs to be logged
225 public function getLog() {
230 * Returns the list of fields that can be imported
232 * @param bool $prefix
236 public static function &import($prefix = FALSE) {
237 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_match', $prefix, []);
242 * Returns the list of fields that can be exported
244 * @param bool $prefix
248 public static function &export($prefix = FALSE) {
249 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_match', $prefix, []);
254 * Returns the list of indices
256 * @param bool $localize
260 public static function indices($localize = TRUE) {
262 'I_civicrm_uf_match_uf_id' => [
263 'name' => 'I_civicrm_uf_match_uf_id',
267 'localizable' => FALSE,
268 'sig' => 'civicrm_uf_match::0::uf_id',
270 'UI_uf_name_domain_id' => [
271 'name' => 'UI_uf_name_domain_id',
276 'localizable' => FALSE,
278 'sig' => 'civicrm_uf_match::1::uf_name::domain_id',
280 'UI_contact_domain_id' => [
281 'name' => 'UI_contact_domain_id',
286 'localizable' => FALSE,
288 'sig' => 'civicrm_uf_match::1::contact_id::domain_id',
291 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;