5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Core/UFJoin.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:d8e9800524a344006c80c158e722f6cd)
13 * Database access object for the UFJoin entity.
15 class CRM_Core_DAO_UFJoin
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_uf_join';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = TRUE;
39 * Is this join currently active?
46 * Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.
53 * Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.
60 * Foreign key to the referenced item.
67 * Controls display order when multiple user framework groups are setup for concurrent display.
74 * Which form does this field belong to.
81 * Json serialized array of data used by the ufjoin.module
90 public function __construct() {
91 $this->__table
= 'civicrm_uf_join';
92 parent
::__construct();
96 * Returns foreign keys and entity references.
99 * [CRM_Core_Reference_Interface]
101 public static function getReferenceColumns() {
102 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
103 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
104 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'uf_group_id', 'civicrm_uf_group', 'id');
105 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName(), 'entity_id', NULL, 'id', 'entity_table');
106 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
108 return Civi
::$statics[__CLASS__
]['links'];
112 * Returns all the column names of this table
116 public static function &fields() {
117 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
118 Civi
::$statics[__CLASS__
]['fields'] = [
121 'type' => CRM_Utils_Type
::T_INT
,
122 'title' => ts('UF Join ID'),
123 'description' => ts('Unique table ID'),
125 'where' => 'civicrm_uf_join.id',
126 'table_name' => 'civicrm_uf_join',
127 'entity' => 'UFJoin',
128 'bao' => 'CRM_Core_BAO_UFJoin',
132 'name' => 'is_active',
133 'type' => CRM_Utils_Type
::T_BOOLEAN
,
134 'title' => ts('Profile Use is active'),
135 'description' => ts('Is this join currently active?'),
136 'where' => 'civicrm_uf_join.is_active',
138 'table_name' => 'civicrm_uf_join',
139 'entity' => 'UFJoin',
140 'bao' => 'CRM_Core_BAO_UFJoin',
145 'type' => CRM_Utils_Type
::T_STRING
,
146 'title' => ts('Profile Module'),
147 'description' => ts('Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.'),
150 'size' => CRM_Utils_Type
::BIG
,
151 'where' => 'civicrm_uf_join.module',
152 'table_name' => 'civicrm_uf_join',
153 'entity' => 'UFJoin',
154 'bao' => 'CRM_Core_BAO_UFJoin',
158 'name' => 'entity_table',
159 'type' => CRM_Utils_Type
::T_STRING
,
160 'title' => ts('Profile Entity Table'),
161 'description' => ts('Name of table where item being referenced is stored. Modules which only need a single collection of uf_join instances may choose not to populate entity_table and entity_id.'),
163 'size' => CRM_Utils_Type
::BIG
,
164 'where' => 'civicrm_uf_join.entity_table',
165 'table_name' => 'civicrm_uf_join',
166 'entity' => 'UFJoin',
167 'bao' => 'CRM_Core_BAO_UFJoin',
169 'pseudoconstant' => [
170 'callback' => 'CRM_Core_BAO_UFJoin::entityTables',
174 'name' => 'entity_id',
175 'type' => CRM_Utils_Type
::T_INT
,
176 'title' => ts('Profile Entity ID'),
177 'description' => ts('Foreign key to the referenced item.'),
178 'where' => 'civicrm_uf_join.entity_id',
179 'table_name' => 'civicrm_uf_join',
180 'entity' => 'UFJoin',
181 'bao' => 'CRM_Core_BAO_UFJoin',
186 'type' => CRM_Utils_Type
::T_INT
,
187 'title' => ts('Order'),
188 'description' => ts('Controls display order when multiple user framework groups are setup for concurrent display.'),
190 'where' => 'civicrm_uf_join.weight',
192 'table_name' => 'civicrm_uf_join',
193 'entity' => 'UFJoin',
194 'bao' => 'CRM_Core_BAO_UFJoin',
198 'name' => 'uf_group_id',
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Profile ID'),
201 'description' => ts('Which form does this field belong to.'),
203 'where' => 'civicrm_uf_join.uf_group_id',
204 'table_name' => 'civicrm_uf_join',
205 'entity' => 'UFJoin',
206 'bao' => 'CRM_Core_BAO_UFJoin',
208 'FKClassName' => 'CRM_Core_DAO_UFGroup',
212 'pseudoconstant' => [
213 'table' => 'civicrm_uf_group',
215 'labelColumn' => 'title',
219 'name' => 'module_data',
220 'type' => CRM_Utils_Type
::T_LONGTEXT
,
221 'title' => ts('Profile Use Data'),
222 'description' => ts('Json serialized array of data used by the ufjoin.module'),
223 'where' => 'civicrm_uf_join.module_data',
224 'table_name' => 'civicrm_uf_join',
225 'entity' => 'UFJoin',
226 'bao' => 'CRM_Core_BAO_UFJoin',
228 'serialize' => self
::SERIALIZE_JSON
,
231 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
233 return Civi
::$statics[__CLASS__
]['fields'];
237 * Return a mapping from field-name to the corresponding key (as used in fields()).
240 * Array(string $name => string $uniqueName).
242 public static function &fieldKeys() {
243 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
244 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
246 return Civi
::$statics[__CLASS__
]['fieldKeys'];
250 * Returns the names of this table
254 public static function getTableName() {
255 return self
::$_tableName;
259 * Returns if this table needs to be logged
263 public function getLog() {
268 * Returns the list of fields that can be imported
270 * @param bool $prefix
274 public static function &import($prefix = FALSE) {
275 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_join', $prefix, []);
280 * Returns the list of fields that can be exported
282 * @param bool $prefix
286 public static function &export($prefix = FALSE) {
287 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_join', $prefix, []);
292 * Returns the list of indices
294 * @param bool $localize
298 public static function indices($localize = TRUE) {
301 'name' => 'index_entity',
306 'localizable' => FALSE,
307 'sig' => 'civicrm_uf_join::0::entity_table::entity_id',
310 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;