3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
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-2015
31 * Generated from xml/schema/CRM/Core/UFJoin.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
34 require_once 'CRM/Core/DAO.php';
35 require_once 'CRM/Utils/Type.php';
36 class CRM_Core_DAO_UFJoin
extends CRM_Core_DAO
{
38 * static instance to hold the table name
42 static $_tableName = 'civicrm_uf_join';
44 * static instance to hold the field values
48 static $_fields = null;
50 * static instance to hold the keys used in $_fields for each field.
54 static $_fieldKeys = null;
56 * static instance to hold the FK relationships
60 static $_links = null;
62 * static instance to hold the values that can
67 static $_import = null;
69 * static instance to hold the values that can
74 static $_export = null;
76 * static value to see if we should log any modifications to
77 * this table in the civicrm_log table
89 * Is this join currently active?
95 * Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.
101 * 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.
105 public $entity_table;
107 * Foreign key to the referenced item.
113 * Controls display order when multiple user framework groups are setup for concurrent display.
119 * Which form does this field belong to.
125 * Json serialized array of data used by the ufjoin.module
133 * @return civicrm_uf_join
135 function __construct() {
136 $this->__table
= 'civicrm_uf_join';
137 parent
::__construct();
140 * Returns foreign keys and entity references
143 * [CRM_Core_Reference_Interface]
145 static function getReferenceColumns() {
146 if (!self
::$_links) {
147 self
::$_links = static ::createReferenceColumns(__CLASS__
);
148 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'uf_group_id', 'civicrm_uf_group', 'id');
149 self
::$_links[] = new CRM_Core_Reference_Dynamic(self
::getTableName() , 'entity_id', NULL, 'id', 'entity_table');
151 return self
::$_links;
154 * Returns all the column names of this table
158 static function &fields() {
159 if (!(self
::$_fields)) {
160 self
::$_fields = array(
163 'type' => CRM_Utils_Type
::T_INT
,
164 'title' => ts('UF Join ID') ,
165 'description' => 'Unique table ID',
168 'is_active' => array(
169 'name' => 'is_active',
170 'type' => CRM_Utils_Type
::T_BOOLEAN
,
171 'title' => ts('Profile Use is active') ,
172 'description' => 'Is this join currently active?',
177 'type' => CRM_Utils_Type
::T_STRING
,
178 'title' => ts('Profile Module') ,
179 'description' => 'Module which owns this uf_join instance, e.g. User Registration, CiviDonate, etc.',
182 'size' => CRM_Utils_Type
::BIG
,
184 'entity_table' => array(
185 'name' => 'entity_table',
186 'type' => CRM_Utils_Type
::T_STRING
,
187 'title' => ts('Profile Entity Table') ,
188 '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.',
190 'size' => CRM_Utils_Type
::BIG
,
192 'entity_id' => array(
193 'name' => 'entity_id',
194 'type' => CRM_Utils_Type
::T_INT
,
195 'title' => ts('Profile Entity ID') ,
196 'description' => 'Foreign key to the referenced item.',
200 'type' => CRM_Utils_Type
::T_INT
,
201 'title' => ts('Order') ,
202 'description' => 'Controls display order when multiple user framework groups are setup for concurrent display.',
206 'uf_group_id' => array(
207 'name' => 'uf_group_id',
208 'type' => CRM_Utils_Type
::T_INT
,
209 'title' => ts('Profile ID') ,
210 'description' => 'Which form does this field belong to.',
212 'FKClassName' => 'CRM_Core_DAO_UFGroup',
216 'pseudoconstant' => array(
217 'table' => 'civicrm_uf_group',
219 'labelColumn' => 'title',
222 'module_data' => array(
223 'name' => 'module_data',
224 'type' => CRM_Utils_Type
::T_LONGTEXT
,
225 'title' => ts('Profile Use Data') ,
226 'description' => 'Json serialized array of data used by the ufjoin.module',
230 return self
::$_fields;
233 * Returns an array containing, for each field, the arary key used for that
234 * field in self::$_fields.
238 static function &fieldKeys() {
239 if (!(self
::$_fieldKeys)) {
240 self
::$_fieldKeys = array(
242 'is_active' => 'is_active',
243 'module' => 'module',
244 'entity_table' => 'entity_table',
245 'entity_id' => 'entity_id',
246 'weight' => 'weight',
247 'uf_group_id' => 'uf_group_id',
248 'module_data' => 'module_data',
251 return self
::$_fieldKeys;
254 * Returns the names of this table
258 static function getTableName() {
259 return self
::$_tableName;
262 * Returns if this table needs to be logged
270 * Returns the list of fields that can be imported
272 * @param bool $prefix
276 static function &import($prefix = false) {
277 if (!(self
::$_import)) {
278 self
::$_import = array();
279 $fields = self
::fields();
280 foreach($fields as $name => $field) {
281 if (CRM_Utils_Array
::value('import', $field)) {
283 self
::$_import['uf_join'] = & $fields[$name];
285 self
::$_import[$name] = & $fields[$name];
290 return self
::$_import;
293 * Returns the list of fields that can be exported
295 * @param bool $prefix
299 static function &export($prefix = false) {
300 if (!(self
::$_export)) {
301 self
::$_export = array();
302 $fields = self
::fields();
303 foreach($fields as $name => $field) {
304 if (CRM_Utils_Array
::value('export', $field)) {
306 self
::$_export['uf_join'] = & $fields[$name];
308 self
::$_export[$name] = & $fields[$name];
313 return self
::$_export;