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/UFField.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:d2130248046efdb387d19bc28fab23b4)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_UFField constructor.
40 class CRM_Core_DAO_UFField
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_uf_field';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
60 * Which form does this field belong to.
66 * Name for CiviCRM field which is being exposed for sharing.
72 * Is this field currently shareable? If false, hide the field for all sharing contexts.
78 * the field is view only and not editable in user forms.
84 * Is this field required when included in a user or registration form?
90 * Controls field display order when user framework fields are displayed in registration and account editing forms.
96 * Description and/or help text to display after this field.
102 * Description and/or help text to display before this field.
108 * In what context(s) is this field visible.
114 * Is this field included as a column in the selector table?
120 * Is this field included search form of profile?
124 public $is_searchable;
126 * Location type of this mapping, if required
130 public $location_type_id;
132 * Phone Type Id, if required
136 public $phone_type_id;
138 * Website Type Id, if required
142 public $website_type_id;
144 * To save label for fields.
150 * This field saves field type (ie individual,household.. field etc).
156 * Is this field reserved for use by some other CiviCRM functionality?
162 * Include in multi-record listing?
166 public $is_multi_summary;
170 function __construct() {
171 $this->__table
= 'civicrm_uf_field';
172 parent
::__construct();
175 * Returns foreign keys and entity references.
178 * [CRM_Core_Reference_Interface]
180 static function getReferenceColumns() {
181 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
182 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
183 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'uf_group_id', 'civicrm_uf_group', 'id');
184 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'location_type_id', 'civicrm_location_type', 'id');
185 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
187 return Civi
::$statics[__CLASS__
]['links'];
190 * Returns all the column names of this table
194 static function &fields() {
195 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
196 Civi
::$statics[__CLASS__
]['fields'] = array(
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Profile Field ID') ,
201 'description' => 'Unique table ID',
203 'table_name' => 'civicrm_uf_field',
204 'entity' => 'UFField',
205 'bao' => 'CRM_Core_BAO_UFField',
207 'uf_group_id' => array(
208 'name' => 'uf_group_id',
209 'type' => CRM_Utils_Type
::T_INT
,
210 'title' => ts('Profile ID') ,
211 'description' => 'Which form does this field belong to.',
213 'table_name' => 'civicrm_uf_field',
214 'entity' => 'UFField',
215 'bao' => 'CRM_Core_BAO_UFField',
216 'FKClassName' => 'CRM_Core_DAO_UFGroup',
220 'pseudoconstant' => array(
221 'table' => 'civicrm_uf_group',
223 'labelColumn' => 'title',
226 'field_name' => array(
227 'name' => 'field_name',
228 'type' => CRM_Utils_Type
::T_STRING
,
229 'title' => ts('Profile Field Name') ,
230 'description' => 'Name for CiviCRM field which is being exposed for sharing.',
233 'size' => CRM_Utils_Type
::BIG
,
234 'table_name' => 'civicrm_uf_field',
235 'entity' => 'UFField',
236 'bao' => 'CRM_Core_BAO_UFField',
238 'is_active' => array(
239 'name' => 'is_active',
240 'type' => CRM_Utils_Type
::T_BOOLEAN
,
241 'title' => ts('Profile Field Is Active') ,
242 'description' => 'Is this field currently shareable? If false, hide the field for all sharing contexts.',
244 'table_name' => 'civicrm_uf_field',
245 'entity' => 'UFField',
246 'bao' => 'CRM_Core_BAO_UFField',
250 'type' => CRM_Utils_Type
::T_BOOLEAN
,
251 'title' => ts('Profile Is View Only') ,
252 'description' => 'the field is view only and not editable in user forms.',
253 'table_name' => 'civicrm_uf_field',
254 'entity' => 'UFField',
255 'bao' => 'CRM_Core_BAO_UFField',
257 'is_required' => array(
258 'name' => 'is_required',
259 'type' => CRM_Utils_Type
::T_BOOLEAN
,
260 'title' => ts('Profile Field Is Required') ,
261 'description' => 'Is this field required when included in a user or registration form?',
262 'table_name' => 'civicrm_uf_field',
263 'entity' => 'UFField',
264 'bao' => 'CRM_Core_BAO_UFField',
268 'type' => CRM_Utils_Type
::T_INT
,
269 'title' => ts('Order') ,
270 'description' => 'Controls field display order when user framework fields are displayed in registration and account editing forms.',
273 'table_name' => 'civicrm_uf_field',
274 'entity' => 'UFField',
275 'bao' => 'CRM_Core_BAO_UFField',
277 'help_post' => array(
278 'name' => 'help_post',
279 'type' => CRM_Utils_Type
::T_TEXT
,
280 'title' => ts('Profile Field Post Help') ,
281 'description' => 'Description and/or help text to display after this field.',
282 'table_name' => 'civicrm_uf_field',
283 'entity' => 'UFField',
284 'bao' => 'CRM_Core_BAO_UFField',
287 'name' => 'help_pre',
288 'type' => CRM_Utils_Type
::T_TEXT
,
289 'title' => ts('Profile Field Pre Help') ,
290 'description' => 'Description and/or help text to display before this field.',
291 'table_name' => 'civicrm_uf_field',
292 'entity' => 'UFField',
293 'bao' => 'CRM_Core_BAO_UFField',
295 'visibility' => array(
296 'name' => 'visibility',
297 'type' => CRM_Utils_Type
::T_STRING
,
298 'title' => ts('Profile Field Visibility') ,
299 'description' => 'In what context(s) is this field visible.',
301 'size' => CRM_Utils_Type
::MEDIUM
,
302 'default' => 'User and User Admin Only',
303 'table_name' => 'civicrm_uf_field',
304 'entity' => 'UFField',
305 'bao' => 'CRM_Core_BAO_UFField',
309 'pseudoconstant' => array(
310 'callback' => 'CRM_Core_SelectValues::ufVisibility',
313 'in_selector' => array(
314 'name' => 'in_selector',
315 'type' => CRM_Utils_Type
::T_BOOLEAN
,
316 'title' => ts('Profile Field Is a Filter') ,
317 'description' => 'Is this field included as a column in the selector table?',
318 'table_name' => 'civicrm_uf_field',
319 'entity' => 'UFField',
320 'bao' => 'CRM_Core_BAO_UFField',
322 'is_searchable' => array(
323 'name' => 'is_searchable',
324 'type' => CRM_Utils_Type
::T_BOOLEAN
,
325 'title' => ts('Profile Field Is Searchable') ,
326 'description' => 'Is this field included search form of profile?',
327 'table_name' => 'civicrm_uf_field',
328 'entity' => 'UFField',
329 'bao' => 'CRM_Core_BAO_UFField',
331 'location_type_id' => array(
332 'name' => 'location_type_id',
333 'type' => CRM_Utils_Type
::T_INT
,
334 'title' => ts('Profile Field Location Type') ,
335 'description' => 'Location type of this mapping, if required',
336 'table_name' => 'civicrm_uf_field',
337 'entity' => 'UFField',
338 'bao' => 'CRM_Core_BAO_UFField',
339 'FKClassName' => 'CRM_Core_DAO_LocationType',
341 'phone_type_id' => array(
342 'name' => 'phone_type_id',
343 'type' => CRM_Utils_Type
::T_INT
,
344 'title' => ts('Profile Field Phone Type') ,
345 'description' => 'Phone Type Id, if required',
346 'table_name' => 'civicrm_uf_field',
347 'entity' => 'UFField',
348 'bao' => 'CRM_Core_BAO_UFField',
350 'website_type_id' => array(
351 'name' => 'website_type_id',
352 'type' => CRM_Utils_Type
::T_INT
,
353 'title' => ts('Profile Field Website Type') ,
354 'description' => 'Website Type Id, if required',
355 'table_name' => 'civicrm_uf_field',
356 'entity' => 'UFField',
357 'bao' => 'CRM_Core_BAO_UFField',
361 'type' => CRM_Utils_Type
::T_STRING
,
362 'title' => ts('Profile Field Label') ,
363 'description' => 'To save label for fields.',
366 'size' => CRM_Utils_Type
::HUGE
,
367 'table_name' => 'civicrm_uf_field',
368 'entity' => 'UFField',
369 'bao' => 'CRM_Core_BAO_UFField',
371 'field_type' => array(
372 'name' => 'field_type',
373 'type' => CRM_Utils_Type
::T_STRING
,
374 'title' => ts('Profile Field Type') ,
375 'description' => 'This field saves field type (ie individual,household.. field etc).',
377 'size' => CRM_Utils_Type
::HUGE
,
378 'table_name' => 'civicrm_uf_field',
379 'entity' => 'UFField',
380 'bao' => 'CRM_Core_BAO_UFField',
382 'is_reserved' => array(
383 'name' => 'is_reserved',
384 'type' => CRM_Utils_Type
::T_BOOLEAN
,
385 'title' => ts('Profile Field Is Reserved') ,
386 'description' => 'Is this field reserved for use by some other CiviCRM functionality?',
387 'table_name' => 'civicrm_uf_field',
388 'entity' => 'UFField',
389 'bao' => 'CRM_Core_BAO_UFField',
391 'is_multi_summary' => array(
392 'name' => 'is_multi_summary',
393 'type' => CRM_Utils_Type
::T_BOOLEAN
,
394 'title' => ts('Profile Field Supports Multiple') ,
395 'description' => 'Include in multi-record listing?',
396 'table_name' => 'civicrm_uf_field',
397 'entity' => 'UFField',
398 'bao' => 'CRM_Core_BAO_UFField',
401 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
403 return Civi
::$statics[__CLASS__
]['fields'];
406 * Return a mapping from field-name to the corresponding key (as used in fields()).
409 * Array(string $name => string $uniqueName).
411 static function &fieldKeys() {
412 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
413 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
415 return Civi
::$statics[__CLASS__
]['fieldKeys'];
418 * Returns the names of this table
422 static function getTableName() {
423 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
426 * Returns if this table needs to be logged
434 * Returns the list of fields that can be imported
436 * @param bool $prefix
440 static function &import($prefix = false) {
441 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_field', $prefix, array());
445 * Returns the list of fields that can be exported
447 * @param bool $prefix
451 static function &export($prefix = false) {
452 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_field', $prefix, array());