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:190b0c5691831c6708b5de7ce556836d)
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',
214 'type' => CRM_Utils_Type
::T_STRING
,
215 'title' => ts('Custom Group Name') ,
216 'description' => 'Variable name/programmatic handle for this group.',
218 'size' => CRM_Utils_Type
::BIG
,
219 'table_name' => 'civicrm_custom_group',
220 'entity' => 'CustomGroup',
221 'bao' => 'CRM_Core_BAO_CustomGroup',
225 'type' => CRM_Utils_Type
::T_STRING
,
226 'title' => ts('Custom Group Title') ,
227 'description' => 'Friendly Name.',
230 'size' => CRM_Utils_Type
::BIG
,
231 'table_name' => 'civicrm_custom_group',
232 'entity' => 'CustomGroup',
233 'bao' => 'CRM_Core_BAO_CustomGroup',
237 'type' => CRM_Utils_Type
::T_STRING
,
238 'title' => ts('Custom Group Extends') ,
239 'description' => 'Type of object this group extends (can add other options later e.g. contact_address, etc.).',
241 'size' => CRM_Utils_Type
::HUGE
,
242 'default' => 'Contact',
243 'table_name' => 'civicrm_custom_group',
244 'entity' => 'CustomGroup',
245 'bao' => 'CRM_Core_BAO_CustomGroup',
247 'extends_entity_column_id' => array(
248 'name' => 'extends_entity_column_id',
249 'type' => CRM_Utils_Type
::T_INT
,
250 'title' => ts('Custom Group Subtype List') ,
251 'description' => 'FK to civicrm_option_value.id (for option group custom_data_type.)',
253 'table_name' => 'civicrm_custom_group',
254 'entity' => 'CustomGroup',
255 'bao' => 'CRM_Core_BAO_CustomGroup',
257 'extends_entity_column_value' => array(
258 'name' => 'extends_entity_column_value',
259 'type' => CRM_Utils_Type
::T_STRING
,
260 'title' => ts('Custom Group Subtype') ,
261 'description' => 'linking custom group for dynamic object',
263 'size' => CRM_Utils_Type
::HUGE
,
264 'table_name' => 'civicrm_custom_group',
265 'entity' => 'CustomGroup',
266 'bao' => 'CRM_Core_BAO_CustomGroup',
270 'type' => CRM_Utils_Type
::T_STRING
,
271 'title' => ts('Custom Group Style') ,
272 'description' => 'Visual relationship between this form and its parent.',
274 'size' => CRM_Utils_Type
::TWELVE
,
275 'table_name' => 'civicrm_custom_group',
276 'entity' => 'CustomGroup',
277 'bao' => 'CRM_Core_BAO_CustomGroup',
281 'pseudoconstant' => array(
282 'callback' => 'CRM_Core_SelectValues::customGroupStyle',
285 'collapse_display' => array(
286 'name' => 'collapse_display',
287 'type' => CRM_Utils_Type
::T_INT
,
288 'title' => ts('Collapse Custom Group?') ,
289 'description' => 'Will this group be in collapsed or expanded mode on initial display ?',
290 'table_name' => 'civicrm_custom_group',
291 'entity' => 'CustomGroup',
292 'bao' => 'CRM_Core_BAO_CustomGroup',
295 'name' => 'help_pre',
296 'type' => CRM_Utils_Type
::T_TEXT
,
297 'title' => ts('Custom Group Pre Text') ,
298 'description' => 'Description and/or help text to display before fields in form.',
301 'table_name' => 'civicrm_custom_group',
302 'entity' => 'CustomGroup',
303 'bao' => 'CRM_Core_BAO_CustomGroup',
305 'type' => 'TextArea',
308 'help_post' => array(
309 'name' => 'help_post',
310 'type' => CRM_Utils_Type
::T_TEXT
,
311 'title' => ts('Custom Group Post Text') ,
312 'description' => 'Description and/or help text to display after fields in form.',
315 'table_name' => 'civicrm_custom_group',
316 'entity' => 'CustomGroup',
317 'bao' => 'CRM_Core_BAO_CustomGroup',
319 'type' => 'TextArea',
324 'type' => CRM_Utils_Type
::T_INT
,
325 'title' => ts('Order') ,
326 'description' => 'Controls display order when multiple extended property groups are setup for the same class.',
329 'table_name' => 'civicrm_custom_group',
330 'entity' => 'CustomGroup',
331 'bao' => 'CRM_Core_BAO_CustomGroup',
333 'is_active' => array(
334 'name' => 'is_active',
335 'type' => CRM_Utils_Type
::T_BOOLEAN
,
336 'title' => ts('Custom Group Is Active?') ,
337 'description' => 'Is this property active?',
338 'table_name' => 'civicrm_custom_group',
339 'entity' => 'CustomGroup',
340 'bao' => 'CRM_Core_BAO_CustomGroup',
342 'table_name' => array(
343 'name' => 'table_name',
344 'type' => CRM_Utils_Type
::T_STRING
,
345 'title' => ts('Table Name') ,
346 'description' => 'Name of the table that holds the values for this group.',
348 'size' => CRM_Utils_Type
::HUGE
,
349 'table_name' => 'civicrm_custom_group',
350 'entity' => 'CustomGroup',
351 'bao' => 'CRM_Core_BAO_CustomGroup',
353 'is_multiple' => array(
354 'name' => 'is_multiple',
355 'type' => CRM_Utils_Type
::T_BOOLEAN
,
356 'title' => ts('Supports Multiple Records') ,
357 'description' => 'Does this group hold multiple values?',
358 'table_name' => 'civicrm_custom_group',
359 'entity' => 'CustomGroup',
360 'bao' => 'CRM_Core_BAO_CustomGroup',
362 'min_multiple' => array(
363 'name' => 'min_multiple',
364 'type' => CRM_Utils_Type
::T_INT
,
365 'title' => ts('Minimum Multiple Records') ,
366 'description' => 'minimum number of multiple records (typically 0?)',
367 'table_name' => 'civicrm_custom_group',
368 'entity' => 'CustomGroup',
369 'bao' => 'CRM_Core_BAO_CustomGroup',
371 'max_multiple' => array(
372 'name' => 'max_multiple',
373 'type' => CRM_Utils_Type
::T_INT
,
374 'title' => ts('Maximum Multiple Records') ,
375 'description' => 'maximum number of multiple records, if 0 - no max',
376 'table_name' => 'civicrm_custom_group',
377 'entity' => 'CustomGroup',
378 'bao' => 'CRM_Core_BAO_CustomGroup',
380 'collapse_adv_display' => array(
381 'name' => 'collapse_adv_display',
382 'type' => CRM_Utils_Type
::T_INT
,
383 'title' => ts('Collapse Group Display') ,
384 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?',
385 'table_name' => 'civicrm_custom_group',
386 'entity' => 'CustomGroup',
387 'bao' => 'CRM_Core_BAO_CustomGroup',
389 'created_id' => array(
390 'name' => 'created_id',
391 'type' => CRM_Utils_Type
::T_INT
,
392 'title' => ts('Custom Group Created By') ,
393 'description' => 'FK to civicrm_contact, who created this custom group',
394 'table_name' => 'civicrm_custom_group',
395 'entity' => 'CustomGroup',
396 'bao' => 'CRM_Core_BAO_CustomGroup',
397 'FKClassName' => 'CRM_Contact_DAO_Contact',
399 'created_date' => array(
400 'name' => 'created_date',
401 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
402 'title' => ts('Custom Group Created Date') ,
403 'description' => 'Date and time this custom group was created.',
404 'table_name' => 'civicrm_custom_group',
405 'entity' => 'CustomGroup',
406 'bao' => 'CRM_Core_BAO_CustomGroup',
408 'is_reserved' => array(
409 'name' => 'is_reserved',
410 'type' => CRM_Utils_Type
::T_BOOLEAN
,
411 'title' => ts('Reserved Group?') ,
412 'description' => 'Is this a reserved Custom Group?',
413 'table_name' => 'civicrm_custom_group',
414 'entity' => 'CustomGroup',
415 'bao' => 'CRM_Core_BAO_CustomGroup',
418 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
420 return Civi
::$statics[__CLASS__
]['fields'];
423 * Return a mapping from field-name to the corresponding key (as used in fields()).
426 * Array(string $name => string $uniqueName).
428 static function &fieldKeys() {
429 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
430 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
432 return Civi
::$statics[__CLASS__
]['fieldKeys'];
435 * Returns the names of this table
439 static function getTableName() {
440 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
443 * Returns if this table needs to be logged
451 * Returns the list of fields that can be imported
453 * @param bool $prefix
457 static function &import($prefix = false) {
458 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'custom_group', $prefix, array());
462 * Returns the list of fields that can be exported
464 * @param bool $prefix
468 static function &export($prefix = false) {
469 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'custom_group', $prefix, array());