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:70a227711539c0b5fdea5349d18e6b7f)
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 localized title of this entity.
98 public static function getEntityTitle() {
103 * Returns foreign keys and entity references.
106 * [CRM_Core_Reference_Interface]
108 public static function getReferenceColumns() {
109 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
110 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
111 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'uf_group_id', 'civicrm_uf_group', 'id');
112 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName(), 'entity_id', NULL, 'id', 'entity_table');
113 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
115 return Civi
::$statics[__CLASS__
]['links'];
119 * Returns all the column names of this table
123 public static function &fields() {
124 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
125 Civi
::$statics[__CLASS__
]['fields'] = [
128 'type' => CRM_Utils_Type
::T_INT
,
129 'title' => ts('UF Join ID'),
130 'description' => ts('Unique table ID'),
132 'where' => 'civicrm_uf_join.id',
133 'table_name' => 'civicrm_uf_join',
134 'entity' => 'UFJoin',
135 'bao' => 'CRM_Core_BAO_UFJoin',
140 'name' => 'is_active',
141 'type' => CRM_Utils_Type
::T_BOOLEAN
,
142 'title' => ts('Profile Use is active'),
143 'description' => ts('Is this join currently active?'),
144 'where' => 'civicrm_uf_join.is_active',
146 'table_name' => 'civicrm_uf_join',
147 'entity' => 'UFJoin',
148 'bao' => 'CRM_Core_BAO_UFJoin',
154 'type' => CRM_Utils_Type
::T_STRING
,
155 'title' => ts('Profile Module'),
156 'description' => ts('Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.'),
159 'size' => CRM_Utils_Type
::BIG
,
160 'where' => 'civicrm_uf_join.module',
161 'table_name' => 'civicrm_uf_join',
162 'entity' => 'UFJoin',
163 'bao' => 'CRM_Core_BAO_UFJoin',
168 'name' => 'entity_table',
169 'type' => CRM_Utils_Type
::T_STRING
,
170 'title' => ts('Profile Entity Table'),
171 '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.'),
173 'size' => CRM_Utils_Type
::BIG
,
174 'where' => 'civicrm_uf_join.entity_table',
175 'table_name' => 'civicrm_uf_join',
176 'entity' => 'UFJoin',
177 'bao' => 'CRM_Core_BAO_UFJoin',
179 'pseudoconstant' => [
180 'callback' => 'CRM_Core_BAO_UFJoin::entityTables',
185 'name' => 'entity_id',
186 'type' => CRM_Utils_Type
::T_INT
,
187 'title' => ts('Profile Entity ID'),
188 'description' => ts('Foreign key to the referenced item.'),
189 'where' => 'civicrm_uf_join.entity_id',
190 'table_name' => 'civicrm_uf_join',
191 'entity' => 'UFJoin',
192 'bao' => 'CRM_Core_BAO_UFJoin',
198 'type' => CRM_Utils_Type
::T_INT
,
199 'title' => ts('Order'),
200 'description' => ts('Controls display order when multiple user framework groups are setup for concurrent display.'),
202 'where' => 'civicrm_uf_join.weight',
204 'table_name' => 'civicrm_uf_join',
205 'entity' => 'UFJoin',
206 'bao' => 'CRM_Core_BAO_UFJoin',
211 'name' => 'uf_group_id',
212 'type' => CRM_Utils_Type
::T_INT
,
213 'title' => ts('Profile ID'),
214 'description' => ts('Which form does this field belong to.'),
216 'where' => 'civicrm_uf_join.uf_group_id',
217 'table_name' => 'civicrm_uf_join',
218 'entity' => 'UFJoin',
219 'bao' => 'CRM_Core_BAO_UFJoin',
221 'FKClassName' => 'CRM_Core_DAO_UFGroup',
225 'pseudoconstant' => [
226 'table' => 'civicrm_uf_group',
228 'labelColumn' => 'title',
233 'name' => 'module_data',
234 'type' => CRM_Utils_Type
::T_LONGTEXT
,
235 'title' => ts('Profile Use Data'),
236 'description' => ts('Json serialized array of data used by the ufjoin.module'),
237 'where' => 'civicrm_uf_join.module_data',
238 'table_name' => 'civicrm_uf_join',
239 'entity' => 'UFJoin',
240 'bao' => 'CRM_Core_BAO_UFJoin',
242 'serialize' => self
::SERIALIZE_JSON
,
246 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
248 return Civi
::$statics[__CLASS__
]['fields'];
252 * Return a mapping from field-name to the corresponding key (as used in fields()).
255 * Array(string $name => string $uniqueName).
257 public static function &fieldKeys() {
258 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
259 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
261 return Civi
::$statics[__CLASS__
]['fieldKeys'];
265 * Returns the names of this table
269 public static function getTableName() {
270 return self
::$_tableName;
274 * Returns if this table needs to be logged
278 public function getLog() {
283 * Returns the list of fields that can be imported
285 * @param bool $prefix
289 public static function &import($prefix = FALSE) {
290 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_join', $prefix, []);
295 * Returns the list of fields that can be exported
297 * @param bool $prefix
301 public static function &export($prefix = FALSE) {
302 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_join', $prefix, []);
307 * Returns the list of indices
309 * @param bool $localize
313 public static function indices($localize = TRUE) {
316 'name' => 'index_entity',
321 'localizable' => FALSE,
322 'sig' => 'civicrm_uf_join::0::entity_table::entity_id',
325 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;