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:9b3c453f7ada933490dc68bc2b45e77b)
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?
176 function __construct() {
177 $this->__table
= 'civicrm_custom_group';
178 parent
::__construct();
181 * Returns foreign keys and entity references.
184 * [CRM_Core_Reference_Interface]
186 static function getReferenceColumns() {
187 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
188 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
189 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
190 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
192 return Civi
::$statics[__CLASS__
]['links'];
195 * Returns all the column names of this table
199 static function &fields() {
200 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
201 Civi
::$statics[__CLASS__
]['fields'] = array(
204 'type' => CRM_Utils_Type
::T_INT
,
205 'title' => ts('Custom Group ID') ,
206 'description' => 'Unique Custom Group ID',
208 'table_name' => 'civicrm_custom_group',
209 'entity' => 'CustomGroup',
210 'bao' => 'CRM_Core_BAO_CustomGroup',
215 'type' => CRM_Utils_Type
::T_STRING
,
216 'title' => ts('Custom Group Name') ,
217 'description' => 'Variable name/programmatic handle for this group.',
219 'size' => CRM_Utils_Type
::BIG
,
220 'table_name' => 'civicrm_custom_group',
221 'entity' => 'CustomGroup',
222 'bao' => 'CRM_Core_BAO_CustomGroup',
227 'type' => CRM_Utils_Type
::T_STRING
,
228 'title' => ts('Custom Group Title') ,
229 'description' => 'Friendly Name.',
232 'size' => CRM_Utils_Type
::BIG
,
233 'table_name' => 'civicrm_custom_group',
234 'entity' => 'CustomGroup',
235 'bao' => 'CRM_Core_BAO_CustomGroup',
240 'type' => CRM_Utils_Type
::T_STRING
,
241 'title' => ts('Custom Group Extends') ,
242 'description' => 'Type of object this group extends (can add other options later e.g. contact_address, etc.).',
244 'size' => CRM_Utils_Type
::HUGE
,
245 'default' => 'Contact',
246 'table_name' => 'civicrm_custom_group',
247 'entity' => 'CustomGroup',
248 'bao' => 'CRM_Core_BAO_CustomGroup',
251 'extends_entity_column_id' => array(
252 'name' => 'extends_entity_column_id',
253 'type' => CRM_Utils_Type
::T_INT
,
254 'title' => ts('Custom Group Subtype List') ,
255 'description' => 'FK to civicrm_option_value.id (for option group custom_data_type.)',
257 'table_name' => 'civicrm_custom_group',
258 'entity' => 'CustomGroup',
259 'bao' => 'CRM_Core_BAO_CustomGroup',
262 'extends_entity_column_value' => array(
263 'name' => 'extends_entity_column_value',
264 'type' => CRM_Utils_Type
::T_STRING
,
265 'title' => ts('Custom Group Subtype') ,
266 'description' => 'linking custom group for dynamic object',
268 'size' => CRM_Utils_Type
::HUGE
,
269 'table_name' => 'civicrm_custom_group',
270 'entity' => 'CustomGroup',
271 'bao' => 'CRM_Core_BAO_CustomGroup',
276 'type' => CRM_Utils_Type
::T_STRING
,
277 'title' => ts('Custom Group Style') ,
278 'description' => 'Visual relationship between this form and its parent.',
280 'size' => CRM_Utils_Type
::TWELVE
,
281 'table_name' => 'civicrm_custom_group',
282 'entity' => 'CustomGroup',
283 'bao' => 'CRM_Core_BAO_CustomGroup',
288 'pseudoconstant' => array(
289 'callback' => 'CRM_Core_SelectValues::customGroupStyle',
292 'collapse_display' => array(
293 'name' => 'collapse_display',
294 'type' => CRM_Utils_Type
::T_INT
,
295 'title' => ts('Collapse Custom Group?') ,
296 'description' => 'Will this group be in collapsed or expanded mode on initial display ?',
297 'table_name' => 'civicrm_custom_group',
298 'entity' => 'CustomGroup',
299 'bao' => 'CRM_Core_BAO_CustomGroup',
303 'name' => 'help_pre',
304 'type' => CRM_Utils_Type
::T_TEXT
,
305 'title' => ts('Custom Group Pre Text') ,
306 'description' => 'Description and/or help text to display before fields in form.',
309 'table_name' => 'civicrm_custom_group',
310 'entity' => 'CustomGroup',
311 'bao' => 'CRM_Core_BAO_CustomGroup',
314 'type' => 'TextArea',
317 'help_post' => array(
318 'name' => 'help_post',
319 'type' => CRM_Utils_Type
::T_TEXT
,
320 'title' => ts('Custom Group Post Text') ,
321 'description' => 'Description and/or help text to display after fields in form.',
324 'table_name' => 'civicrm_custom_group',
325 'entity' => 'CustomGroup',
326 'bao' => 'CRM_Core_BAO_CustomGroup',
329 'type' => 'TextArea',
334 'type' => CRM_Utils_Type
::T_INT
,
335 'title' => ts('Order') ,
336 'description' => 'Controls display order when multiple extended property groups are setup for the same class.',
339 'table_name' => 'civicrm_custom_group',
340 'entity' => 'CustomGroup',
341 'bao' => 'CRM_Core_BAO_CustomGroup',
344 'is_active' => array(
345 'name' => 'is_active',
346 'type' => CRM_Utils_Type
::T_BOOLEAN
,
347 'title' => ts('Custom Group Is Active?') ,
348 'description' => 'Is this property active?',
349 'table_name' => 'civicrm_custom_group',
350 'entity' => 'CustomGroup',
351 'bao' => 'CRM_Core_BAO_CustomGroup',
354 'table_name' => array(
355 'name' => 'table_name',
356 'type' => CRM_Utils_Type
::T_STRING
,
357 'title' => ts('Table Name') ,
358 'description' => 'Name of the table that holds the values for this group.',
360 'size' => CRM_Utils_Type
::HUGE
,
361 'table_name' => 'civicrm_custom_group',
362 'entity' => 'CustomGroup',
363 'bao' => 'CRM_Core_BAO_CustomGroup',
366 'is_multiple' => array(
367 'name' => 'is_multiple',
368 'type' => CRM_Utils_Type
::T_BOOLEAN
,
369 'title' => ts('Supports Multiple Records') ,
370 'description' => 'Does this group hold multiple values?',
371 'table_name' => 'civicrm_custom_group',
372 'entity' => 'CustomGroup',
373 'bao' => 'CRM_Core_BAO_CustomGroup',
376 'min_multiple' => array(
377 'name' => 'min_multiple',
378 'type' => CRM_Utils_Type
::T_INT
,
379 'title' => ts('Minimum Multiple Records') ,
380 'description' => 'minimum number of multiple records (typically 0?)',
381 'table_name' => 'civicrm_custom_group',
382 'entity' => 'CustomGroup',
383 'bao' => 'CRM_Core_BAO_CustomGroup',
386 'max_multiple' => array(
387 'name' => 'max_multiple',
388 'type' => CRM_Utils_Type
::T_INT
,
389 'title' => ts('Maximum Multiple Records') ,
390 'description' => 'maximum number of multiple records, if 0 - no max',
391 'table_name' => 'civicrm_custom_group',
392 'entity' => 'CustomGroup',
393 'bao' => 'CRM_Core_BAO_CustomGroup',
396 'collapse_adv_display' => array(
397 'name' => 'collapse_adv_display',
398 'type' => CRM_Utils_Type
::T_INT
,
399 'title' => ts('Collapse Group Display') ,
400 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?',
401 'table_name' => 'civicrm_custom_group',
402 'entity' => 'CustomGroup',
403 'bao' => 'CRM_Core_BAO_CustomGroup',
406 'created_id' => array(
407 'name' => 'created_id',
408 'type' => CRM_Utils_Type
::T_INT
,
409 'title' => ts('Custom Group Created By') ,
410 'description' => 'FK to civicrm_contact, who created this custom group',
411 'table_name' => 'civicrm_custom_group',
412 'entity' => 'CustomGroup',
413 'bao' => 'CRM_Core_BAO_CustomGroup',
415 'FKClassName' => 'CRM_Contact_DAO_Contact',
417 'created_date' => array(
418 'name' => 'created_date',
419 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
420 'title' => ts('Custom Group Created Date') ,
421 'description' => 'Date and time this custom group was created.',
422 'table_name' => 'civicrm_custom_group',
423 'entity' => 'CustomGroup',
424 'bao' => 'CRM_Core_BAO_CustomGroup',
427 'is_reserved' => array(
428 'name' => 'is_reserved',
429 'type' => CRM_Utils_Type
::T_BOOLEAN
,
430 'title' => ts('Reserved Group?') ,
431 'description' => 'Is this a reserved Custom Group?',
432 'table_name' => 'civicrm_custom_group',
433 'entity' => 'CustomGroup',
434 'bao' => 'CRM_Core_BAO_CustomGroup',
438 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
440 return Civi
::$statics[__CLASS__
]['fields'];
443 * Return a mapping from field-name to the corresponding key (as used in fields()).
446 * Array(string $name => string $uniqueName).
448 static function &fieldKeys() {
449 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
450 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
452 return Civi
::$statics[__CLASS__
]['fieldKeys'];
455 * Returns the names of this table
459 static function getTableName() {
460 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
463 * Returns if this table needs to be logged
471 * Returns the list of fields that can be imported
473 * @param bool $prefix
477 static function &import($prefix = false) {
478 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'custom_group', $prefix, array());
482 * Returns the list of fields that can be exported
484 * @param bool $prefix
488 static function &export($prefix = false) {
489 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'custom_group', $prefix, array());