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/CustomGroup.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:5b2dac3266e0184dc4eaa6de10c9d401)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Core_DAO_CustomGroup constructor.
40 class CRM_Core_DAO_CustomGroup
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_custom_group';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * Unique Custom Group ID
60 * Variable name/programmatic handle for this group.
72 * Type of object this group extends (can add other options later e.g. contact_address, etc.).
78 * FK to civicrm_option_value.id (for option group custom_data_type.)
82 public $extends_entity_column_id;
84 * linking custom group for dynamic object
88 public $extends_entity_column_value;
90 * Visual relationship between this form and its parent.
96 * Will this group be in collapsed or expanded mode on initial display ?
100 public $collapse_display;
102 * Description and/or help text to display before fields in form.
108 * Description and/or help text to display after fields in form.
114 * Controls display order when multiple extended property groups are setup for the same class.
120 * Is this property active?
126 * Name of the table that holds the values for this group.
132 * Does this group hold multiple values?
138 * minimum number of multiple records (typically 0?)
142 public $min_multiple;
144 * maximum number of multiple records, if 0 - no max
148 public $max_multiple;
150 * Will this group be in collapsed or expanded mode on advanced search display ?
154 public $collapse_adv_display;
156 * FK to civicrm_contact, who created this custom group
162 * Date and time this custom group was created.
166 public $created_date;
168 * Is this a reserved Custom Group?
174 * Is this property public?
182 function __construct() {
183 $this->__table
= 'civicrm_custom_group';
184 parent
::__construct();
187 * Returns foreign keys and entity references.
190 * [CRM_Core_Reference_Interface]
192 static function getReferenceColumns() {
193 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
194 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
195 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
196 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
198 return Civi
::$statics[__CLASS__
]['links'];
201 * Returns all the column names of this table
205 static function &fields() {
206 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
207 Civi
::$statics[__CLASS__
]['fields'] = array(
210 'type' => CRM_Utils_Type
::T_INT
,
211 'title' => ts('Custom Group ID') ,
212 'description' => 'Unique Custom Group ID',
214 'table_name' => 'civicrm_custom_group',
215 'entity' => 'CustomGroup',
216 'bao' => 'CRM_Core_BAO_CustomGroup',
221 'type' => CRM_Utils_Type
::T_STRING
,
222 'title' => ts('Custom Group Name') ,
223 'description' => 'Variable name/programmatic handle for this group.',
225 'size' => CRM_Utils_Type
::BIG
,
226 'table_name' => 'civicrm_custom_group',
227 'entity' => 'CustomGroup',
228 'bao' => 'CRM_Core_BAO_CustomGroup',
233 'type' => CRM_Utils_Type
::T_STRING
,
234 'title' => ts('Custom Group Title') ,
235 'description' => 'Friendly Name.',
238 'size' => CRM_Utils_Type
::BIG
,
239 'table_name' => 'civicrm_custom_group',
240 'entity' => 'CustomGroup',
241 'bao' => 'CRM_Core_BAO_CustomGroup',
246 'type' => CRM_Utils_Type
::T_STRING
,
247 'title' => ts('Custom Group Extends') ,
248 'description' => 'Type of object this group extends (can add other options later e.g. contact_address, etc.).',
250 'size' => CRM_Utils_Type
::HUGE
,
251 'default' => 'Contact',
252 'table_name' => 'civicrm_custom_group',
253 'entity' => 'CustomGroup',
254 'bao' => 'CRM_Core_BAO_CustomGroup',
257 'extends_entity_column_id' => array(
258 'name' => 'extends_entity_column_id',
259 'type' => CRM_Utils_Type
::T_INT
,
260 'title' => ts('Custom Group Subtype List') ,
261 'description' => 'FK to civicrm_option_value.id (for option group custom_data_type.)',
263 'table_name' => 'civicrm_custom_group',
264 'entity' => 'CustomGroup',
265 'bao' => 'CRM_Core_BAO_CustomGroup',
268 'extends_entity_column_value' => array(
269 'name' => 'extends_entity_column_value',
270 'type' => CRM_Utils_Type
::T_STRING
,
271 'title' => ts('Custom Group Subtype') ,
272 'description' => 'linking custom group for dynamic object',
274 'size' => CRM_Utils_Type
::HUGE
,
275 'table_name' => 'civicrm_custom_group',
276 'entity' => 'CustomGroup',
277 'bao' => 'CRM_Core_BAO_CustomGroup',
282 'type' => CRM_Utils_Type
::T_STRING
,
283 'title' => ts('Custom Group Style') ,
284 'description' => 'Visual relationship between this form and its parent.',
286 'size' => CRM_Utils_Type
::TWELVE
,
287 'table_name' => 'civicrm_custom_group',
288 'entity' => 'CustomGroup',
289 'bao' => 'CRM_Core_BAO_CustomGroup',
294 'pseudoconstant' => array(
295 'callback' => 'CRM_Core_SelectValues::customGroupStyle',
298 'collapse_display' => array(
299 'name' => 'collapse_display',
300 'type' => CRM_Utils_Type
::T_INT
,
301 'title' => ts('Collapse Custom Group?') ,
302 'description' => 'Will this group be in collapsed or expanded mode on initial display ?',
303 'table_name' => 'civicrm_custom_group',
304 'entity' => 'CustomGroup',
305 'bao' => 'CRM_Core_BAO_CustomGroup',
309 'name' => 'help_pre',
310 'type' => CRM_Utils_Type
::T_TEXT
,
311 'title' => ts('Custom Group Pre Text') ,
312 'description' => 'Description and/or help text to display before fields in form.',
315 'table_name' => 'civicrm_custom_group',
316 'entity' => 'CustomGroup',
317 'bao' => 'CRM_Core_BAO_CustomGroup',
320 'type' => 'TextArea',
323 'help_post' => array(
324 'name' => 'help_post',
325 'type' => CRM_Utils_Type
::T_TEXT
,
326 'title' => ts('Custom Group Post Text') ,
327 'description' => 'Description and/or help text to display after fields in form.',
330 'table_name' => 'civicrm_custom_group',
331 'entity' => 'CustomGroup',
332 'bao' => 'CRM_Core_BAO_CustomGroup',
335 'type' => 'TextArea',
340 'type' => CRM_Utils_Type
::T_INT
,
341 'title' => ts('Order') ,
342 'description' => 'Controls display order when multiple extended property groups are setup for the same class.',
345 'table_name' => 'civicrm_custom_group',
346 'entity' => 'CustomGroup',
347 'bao' => 'CRM_Core_BAO_CustomGroup',
350 'is_active' => array(
351 'name' => 'is_active',
352 'type' => CRM_Utils_Type
::T_BOOLEAN
,
353 'title' => ts('Custom Group Is Active?') ,
354 'description' => 'Is this property active?',
355 'table_name' => 'civicrm_custom_group',
356 'entity' => 'CustomGroup',
357 'bao' => 'CRM_Core_BAO_CustomGroup',
360 'table_name' => array(
361 'name' => 'table_name',
362 'type' => CRM_Utils_Type
::T_STRING
,
363 'title' => ts('Table Name') ,
364 'description' => 'Name of the table that holds the values for this group.',
366 'size' => CRM_Utils_Type
::HUGE
,
367 'table_name' => 'civicrm_custom_group',
368 'entity' => 'CustomGroup',
369 'bao' => 'CRM_Core_BAO_CustomGroup',
372 'is_multiple' => array(
373 'name' => 'is_multiple',
374 'type' => CRM_Utils_Type
::T_BOOLEAN
,
375 'title' => ts('Supports Multiple Records') ,
376 'description' => 'Does this group hold multiple values?',
377 'table_name' => 'civicrm_custom_group',
378 'entity' => 'CustomGroup',
379 'bao' => 'CRM_Core_BAO_CustomGroup',
382 'min_multiple' => array(
383 'name' => 'min_multiple',
384 'type' => CRM_Utils_Type
::T_INT
,
385 'title' => ts('Minimum Multiple Records') ,
386 'description' => 'minimum number of multiple records (typically 0?)',
387 'table_name' => 'civicrm_custom_group',
388 'entity' => 'CustomGroup',
389 'bao' => 'CRM_Core_BAO_CustomGroup',
392 'max_multiple' => array(
393 'name' => 'max_multiple',
394 'type' => CRM_Utils_Type
::T_INT
,
395 'title' => ts('Maximum Multiple Records') ,
396 'description' => 'maximum number of multiple records, if 0 - no max',
397 'table_name' => 'civicrm_custom_group',
398 'entity' => 'CustomGroup',
399 'bao' => 'CRM_Core_BAO_CustomGroup',
402 'collapse_adv_display' => array(
403 'name' => 'collapse_adv_display',
404 'type' => CRM_Utils_Type
::T_INT
,
405 'title' => ts('Collapse Group Display') ,
406 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?',
407 'table_name' => 'civicrm_custom_group',
408 'entity' => 'CustomGroup',
409 'bao' => 'CRM_Core_BAO_CustomGroup',
412 'created_id' => array(
413 'name' => 'created_id',
414 'type' => CRM_Utils_Type
::T_INT
,
415 'title' => ts('Custom Group Created By') ,
416 'description' => 'FK to civicrm_contact, who created this custom group',
417 'table_name' => 'civicrm_custom_group',
418 'entity' => 'CustomGroup',
419 'bao' => 'CRM_Core_BAO_CustomGroup',
421 'FKClassName' => 'CRM_Contact_DAO_Contact',
423 'created_date' => array(
424 'name' => 'created_date',
425 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
426 'title' => ts('Custom Group Created Date') ,
427 'description' => 'Date and time this custom group was created.',
428 'table_name' => 'civicrm_custom_group',
429 'entity' => 'CustomGroup',
430 'bao' => 'CRM_Core_BAO_CustomGroup',
433 'is_reserved' => array(
434 'name' => 'is_reserved',
435 'type' => CRM_Utils_Type
::T_BOOLEAN
,
436 'title' => ts('Reserved Group?') ,
437 'description' => 'Is this a reserved Custom Group?',
438 'table_name' => 'civicrm_custom_group',
439 'entity' => 'CustomGroup',
440 'bao' => 'CRM_Core_BAO_CustomGroup',
443 'is_public' => array(
444 'name' => 'is_public',
445 'type' => CRM_Utils_Type
::T_BOOLEAN
,
446 'title' => ts('Custom Group Is Public?') ,
447 'description' => 'Is this property public?',
449 'table_name' => 'civicrm_custom_group',
450 'entity' => 'CustomGroup',
451 'bao' => 'CRM_Core_BAO_CustomGroup',
455 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
457 return Civi
::$statics[__CLASS__
]['fields'];
460 * Return a mapping from field-name to the corresponding key (as used in fields()).
463 * Array(string $name => string $uniqueName).
465 static function &fieldKeys() {
466 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
467 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
469 return Civi
::$statics[__CLASS__
]['fieldKeys'];
472 * Returns the names of this table
476 static function getTableName() {
477 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
480 * Returns if this table needs to be logged
488 * Returns the list of fields that can be imported
490 * @param bool $prefix
494 static function &import($prefix = false) {
495 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'custom_group', $prefix, array());
499 * Returns the list of fields that can be exported
501 * @param bool $prefix
505 static function &export($prefix = false) {
506 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'custom_group', $prefix, array());
510 * Returns the list of indices
512 public static function indices($localize = TRUE) {
514 'UI_title_extends' => array(
515 'name' => 'UI_title_extends',
520 'localizable' => true,
522 'sig' => 'civicrm_custom_group::1::title::extends',
524 'UI_name_extends' => array(
525 'name' => 'UI_name_extends',
530 'localizable' => false,
532 'sig' => 'civicrm_custom_group::1::name::extends',
535 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;