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:01465947abefe26da02c4a81505afe08)
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',
211 'type' => CRM_Utils_Type
::T_STRING
,
212 'title' => ts('Custom Group Name') ,
213 'description' => 'Variable name/programmatic handle for this group.',
215 'size' => CRM_Utils_Type
::BIG
,
219 'type' => CRM_Utils_Type
::T_STRING
,
220 'title' => ts('Custom Group Title') ,
221 'description' => 'Friendly Name.',
224 'size' => CRM_Utils_Type
::BIG
,
228 'type' => CRM_Utils_Type
::T_STRING
,
229 'title' => ts('Custom Group Extends') ,
230 'description' => 'Type of object this group extends (can add other options later e.g. contact_address, etc.).',
232 'size' => CRM_Utils_Type
::HUGE
,
233 'default' => 'Contact',
235 'extends_entity_column_id' => array(
236 'name' => 'extends_entity_column_id',
237 'type' => CRM_Utils_Type
::T_INT
,
238 'title' => ts('Custom Group Subtype List') ,
239 'description' => 'FK to civicrm_option_value.id (for option group custom_data_type.)',
242 'extends_entity_column_value' => array(
243 'name' => 'extends_entity_column_value',
244 'type' => CRM_Utils_Type
::T_STRING
,
245 'title' => ts('Custom Group Subtype') ,
246 'description' => 'linking custom group for dynamic object',
248 'size' => CRM_Utils_Type
::HUGE
,
252 'type' => CRM_Utils_Type
::T_STRING
,
253 'title' => ts('Custom Group Style') ,
254 'description' => 'Visual relationship between this form and its parent.',
256 'size' => CRM_Utils_Type
::TWELVE
,
260 'pseudoconstant' => array(
261 'callback' => 'CRM_Core_SelectValues::customGroupStyle',
264 'collapse_display' => array(
265 'name' => 'collapse_display',
266 'type' => CRM_Utils_Type
::T_INT
,
267 'title' => ts('Collapse Custom Group?') ,
268 'description' => 'Will this group be in collapsed or expanded mode on initial display ?',
271 'name' => 'help_pre',
272 'type' => CRM_Utils_Type
::T_TEXT
,
273 'title' => ts('Custom Group Pre Text') ,
274 'description' => 'Description and/or help text to display before fields in form.',
278 'type' => 'TextArea',
281 'help_post' => array(
282 'name' => 'help_post',
283 'type' => CRM_Utils_Type
::T_TEXT
,
284 'title' => ts('Custom Group Post Text') ,
285 'description' => 'Description and/or help text to display after fields in form.',
289 'type' => 'TextArea',
294 'type' => CRM_Utils_Type
::T_INT
,
295 'title' => ts('Order') ,
296 'description' => 'Controls display order when multiple extended property groups are setup for the same class.',
300 'is_active' => array(
301 'name' => 'is_active',
302 'type' => CRM_Utils_Type
::T_BOOLEAN
,
303 'title' => ts('Custom Group Is Active?') ,
304 'description' => 'Is this property active?',
306 'table_name' => array(
307 'name' => 'table_name',
308 'type' => CRM_Utils_Type
::T_STRING
,
309 'title' => ts('Table Name') ,
310 'description' => 'Name of the table that holds the values for this group.',
312 'size' => CRM_Utils_Type
::HUGE
,
314 'is_multiple' => array(
315 'name' => 'is_multiple',
316 'type' => CRM_Utils_Type
::T_BOOLEAN
,
317 'title' => ts('Supports Multiple Records') ,
318 'description' => 'Does this group hold multiple values?',
320 'min_multiple' => array(
321 'name' => 'min_multiple',
322 'type' => CRM_Utils_Type
::T_INT
,
323 'title' => ts('Minimum Multiple Records') ,
324 'description' => 'minimum number of multiple records (typically 0?)',
326 'max_multiple' => array(
327 'name' => 'max_multiple',
328 'type' => CRM_Utils_Type
::T_INT
,
329 'title' => ts('Maximum Multiple Records') ,
330 'description' => 'maximum number of multiple records, if 0 - no max',
332 'collapse_adv_display' => array(
333 'name' => 'collapse_adv_display',
334 'type' => CRM_Utils_Type
::T_INT
,
335 'title' => ts('Collapse Group Display') ,
336 'description' => 'Will this group be in collapsed or expanded mode on advanced search display ?',
338 'created_id' => array(
339 'name' => 'created_id',
340 'type' => CRM_Utils_Type
::T_INT
,
341 'title' => ts('Custom Group Created By') ,
342 'description' => 'FK to civicrm_contact, who created this custom group',
343 'FKClassName' => 'CRM_Contact_DAO_Contact',
345 'created_date' => array(
346 'name' => 'created_date',
347 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
348 'title' => ts('Custom Group Created Date') ,
349 'description' => 'Date and time this custom group was created.',
351 'is_reserved' => array(
352 'name' => 'is_reserved',
353 'type' => CRM_Utils_Type
::T_BOOLEAN
,
354 'title' => ts('Reserved Group?') ,
355 'description' => 'Is this a reserved Custom Group?',
358 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
360 return Civi
::$statics[__CLASS__
]['fields'];
363 * Return a mapping from field-name to the corresponding key (as used in fields()).
366 * Array(string $name => string $uniqueName).
368 static function &fieldKeys() {
369 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
370 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
372 return Civi
::$statics[__CLASS__
]['fieldKeys'];
375 * Returns the names of this table
379 static function getTableName() {
380 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
383 * Returns if this table needs to be logged
391 * Returns the list of fields that can be imported
393 * @param bool $prefix
397 static function &import($prefix = false) {
398 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'custom_group', $prefix, array());
402 * Returns the list of fields that can be exported
404 * @param bool $prefix
408 static function &export($prefix = false) {
409 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'custom_group', $prefix, array());