3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Core/UFJoin.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:ff46cde9614a8c441e00dc66cdeb8667)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_UFJoin constructor.
40 class CRM_Core_DAO_UFJoin
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_uf_join';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Is this join currently active?
66 * Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.
72 * 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.
78 * Foreign key to the referenced item.
84 * Controls display order when multiple user framework groups are setup for concurrent display.
90 * Which form does this field belong to.
96 * Json serialized array of data used by the ufjoin.module
104 function __construct() {
105 $this->__table
= 'civicrm_uf_join';
106 parent
::__construct();
109 * Returns foreign keys and entity references.
112 * [CRM_Core_Reference_Interface]
114 static function getReferenceColumns() {
115 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
116 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
117 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'uf_group_id', 'civicrm_uf_group', 'id');
118 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
119 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
121 return Civi
::$statics[__CLASS__
]['links'];
124 * Returns all the column names of this table
128 static function &fields() {
129 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
130 Civi
::$statics[__CLASS__
]['fields'] = array(
133 'type' => CRM_Utils_Type
::T_INT
,
134 'title' => ts('UF Join ID') ,
135 'description' => 'Unique table ID',
137 'table_name' => 'civicrm_uf_join',
138 'entity' => 'UFJoin',
139 'bao' => 'CRM_Core_BAO_UFJoin',
141 'is_active' => array(
142 'name' => 'is_active',
143 'type' => CRM_Utils_Type
::T_BOOLEAN
,
144 'title' => ts('Profile Use is active') ,
145 'description' => 'Is this join currently active?',
147 'table_name' => 'civicrm_uf_join',
148 'entity' => 'UFJoin',
149 'bao' => 'CRM_Core_BAO_UFJoin',
153 'type' => CRM_Utils_Type
::T_STRING
,
154 'title' => ts('Profile Module') ,
155 'description' => 'Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.',
158 'size' => CRM_Utils_Type
::BIG
,
159 'table_name' => 'civicrm_uf_join',
160 'entity' => 'UFJoin',
161 'bao' => 'CRM_Core_BAO_UFJoin',
163 'entity_table' => array(
164 'name' => 'entity_table',
165 'type' => CRM_Utils_Type
::T_STRING
,
166 'title' => ts('Profile Entity Table') ,
167 'description' => '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.',
169 'size' => CRM_Utils_Type
::BIG
,
170 'table_name' => 'civicrm_uf_join',
171 'entity' => 'UFJoin',
172 'bao' => 'CRM_Core_BAO_UFJoin',
173 'pseudoconstant' => array(
174 'callback' => 'CRM_Core_BAO_UFJoin::entityTables',
177 'entity_id' => array(
178 'name' => 'entity_id',
179 'type' => CRM_Utils_Type
::T_INT
,
180 'title' => ts('Profile Entity ID') ,
181 'description' => 'Foreign key to the referenced item.',
182 'table_name' => 'civicrm_uf_join',
183 'entity' => 'UFJoin',
184 'bao' => 'CRM_Core_BAO_UFJoin',
188 'type' => CRM_Utils_Type
::T_INT
,
189 'title' => ts('Order') ,
190 'description' => 'Controls display order when multiple user framework groups are setup for concurrent display.',
193 'table_name' => 'civicrm_uf_join',
194 'entity' => 'UFJoin',
195 'bao' => 'CRM_Core_BAO_UFJoin',
197 'uf_group_id' => array(
198 'name' => 'uf_group_id',
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Profile ID') ,
201 'description' => 'Which form does this field belong to.',
203 'table_name' => 'civicrm_uf_join',
204 'entity' => 'UFJoin',
205 'bao' => 'CRM_Core_BAO_UFJoin',
206 'FKClassName' => 'CRM_Core_DAO_UFGroup',
210 'pseudoconstant' => array(
211 'table' => 'civicrm_uf_group',
213 'labelColumn' => 'title',
216 'module_data' => array(
217 'name' => 'module_data',
218 'type' => CRM_Utils_Type
::T_LONGTEXT
,
219 'title' => ts('Profile Use Data') ,
220 'description' => 'Json serialized array of data used by the ufjoin.module',
221 'table_name' => 'civicrm_uf_join',
222 'entity' => 'UFJoin',
223 'bao' => 'CRM_Core_BAO_UFJoin',
226 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
228 return Civi
::$statics[__CLASS__
]['fields'];
231 * Return a mapping from field-name to the corresponding key (as used in fields()).
234 * Array(string $name => string $uniqueName).
236 static function &fieldKeys() {
237 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
238 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
240 return Civi
::$statics[__CLASS__
]['fieldKeys'];
243 * Returns the names of this table
247 static function getTableName() {
248 return self
::$_tableName;
251 * Returns if this table needs to be logged
259 * Returns the list of fields that can be imported
261 * @param bool $prefix
265 static function &import($prefix = false) {
266 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_join', $prefix, array());
270 * Returns the list of fields that can be exported
272 * @param bool $prefix
276 static function &export($prefix = false) {
277 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_join', $prefix, array());