3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Core/UFGroup.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:0428de652198e17e9b651a08e38f9cc4)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Core_DAO_UFGroup
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_uf_group';
45 * static value to see if we should log any modifications to
46 * this table in the civicrm_log table
58 * Is this form currently active? If false, hide all related fields for all sharing contexts.
64 * This column will store a comma separated list of the type(s) of profile fields.
76 * Optional verbose description of the profile.
82 * Description and/or help text to display before fields in form.
88 * Description and/or help text to display after fields in form.
94 * Group id, foreign key from civicrm_group
98 public $limit_listings_group_id;
106 * foreign key to civicrm_group_id
110 public $add_to_group_id;
112 * Should a CAPTCHA widget be included this Profile form.
118 * Do we want to map results from this profile.
124 * Should edit link display in profile selector
128 public $is_edit_link;
130 * Should we display a link to the website profile in profile selector
136 * Should we update the contact record if we find a duplicate
140 public $is_update_dupe;
142 * Redirect to URL when Cancle button clik .
148 * Should we create a cms user for this profile
159 * Is this group reserved for use by some other CiviCRM functionality?
165 * Name of the UF group for directly addressing it in the codebase
171 * FK to civicrm_contact, who created this UF group
177 * Date and time this UF group was created.
181 public $created_date;
183 * Should we include proximity search feature in this profile search form?
187 public $is_proximity_search;
191 * @return civicrm_uf_group
193 function __construct() {
194 $this->__table
= 'civicrm_uf_group';
195 parent
::__construct();
198 * Returns foreign keys and entity references
201 * [CRM_Core_Reference_Interface]
203 static function getReferenceColumns() {
204 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
205 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
206 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'limit_listings_group_id', 'civicrm_group', 'id');
207 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'add_to_group_id', 'civicrm_group', 'id');
208 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'created_id', 'civicrm_contact', 'id');
209 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
211 return Civi
::$statics[__CLASS__
]['links'];
214 * Returns all the column names of this table
218 static function &fields() {
219 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
220 Civi
::$statics[__CLASS__
]['fields'] = array(
223 'type' => CRM_Utils_Type
::T_INT
,
224 'title' => ts('Profile ID') ,
225 'description' => 'Unique table ID',
228 'is_active' => array(
229 'name' => 'is_active',
230 'type' => CRM_Utils_Type
::T_BOOLEAN
,
231 'title' => ts('Profile Is Active') ,
232 'description' => 'Is this form currently active? If false, hide all related fields for all sharing contexts.',
235 'group_type' => array(
236 'name' => 'group_type',
237 'type' => CRM_Utils_Type
::T_STRING
,
238 'title' => ts('Profile Group Type') ,
239 'description' => 'This column will store a comma separated list of the type(s) of profile fields.',
241 'size' => CRM_Utils_Type
::HUGE
,
243 'where' => 'civicrm_uf_group.group_type',
244 'headerPattern' => '',
250 'type' => CRM_Utils_Type
::T_STRING
,
251 'title' => ts('Title') ,
252 'description' => 'Form title.',
255 'size' => CRM_Utils_Type
::BIG
,
257 'description' => array(
258 'name' => 'description',
259 'type' => CRM_Utils_Type
::T_TEXT
,
260 'title' => ts('Profile Description') ,
261 'description' => 'Optional verbose description of the profile.',
265 'type' => 'TextArea',
269 'name' => 'help_pre',
270 'type' => CRM_Utils_Type
::T_TEXT
,
271 'title' => ts('Help Pre') ,
272 'description' => 'Description and/or help text to display before fields in form.',
276 'type' => 'TextArea',
279 'help_post' => array(
280 'name' => 'help_post',
281 'type' => CRM_Utils_Type
::T_TEXT
,
282 'title' => ts('Profile Post Text') ,
283 'description' => 'Description and/or help text to display after fields in form.',
287 'type' => 'TextArea',
290 'limit_listings_group_id' => array(
291 'name' => 'limit_listings_group_id',
292 'type' => CRM_Utils_Type
::T_INT
,
293 'title' => ts('Profile Search Limit Group') ,
294 'description' => 'Group id, foreign key from civicrm_group',
295 'FKClassName' => 'CRM_Contact_DAO_Group',
298 'name' => 'post_URL',
299 'type' => CRM_Utils_Type
::T_STRING
,
300 'title' => ts('Post Url') ,
301 'description' => 'Redirect to URL.',
303 'size' => CRM_Utils_Type
::HUGE
,
305 'add_to_group_id' => array(
306 'name' => 'add_to_group_id',
307 'type' => CRM_Utils_Type
::T_INT
,
308 'title' => ts('Add Contact To Group') ,
309 'description' => 'foreign key to civicrm_group_id',
310 'FKClassName' => 'CRM_Contact_DAO_Group',
312 'add_captcha' => array(
313 'name' => 'add_captcha',
314 'type' => CRM_Utils_Type
::T_BOOLEAN
,
315 'title' => ts('Show Captcha On Profile') ,
316 'description' => 'Should a CAPTCHA widget be included this Profile form.',
320 'type' => CRM_Utils_Type
::T_BOOLEAN
,
321 'title' => ts('Map Profile') ,
322 'description' => 'Do we want to map results from this profile.',
324 'is_edit_link' => array(
325 'name' => 'is_edit_link',
326 'type' => CRM_Utils_Type
::T_BOOLEAN
,
327 'title' => ts('Show Edit Link?') ,
328 'description' => 'Should edit link display in profile selector',
330 'is_uf_link' => array(
331 'name' => 'is_uf_link',
332 'type' => CRM_Utils_Type
::T_BOOLEAN
,
333 'title' => ts('Show Link to CMS User') ,
334 'description' => 'Should we display a link to the website profile in profile selector',
336 'is_update_dupe' => array(
337 'name' => 'is_update_dupe',
338 'type' => CRM_Utils_Type
::T_BOOLEAN
,
339 'title' => ts('Update on Duplicate') ,
340 'description' => 'Should we update the contact record if we find a duplicate',
342 'cancel_URL' => array(
343 'name' => 'cancel_URL',
344 'type' => CRM_Utils_Type
::T_STRING
,
345 'title' => ts('Profile Cancel URL') ,
346 'description' => 'Redirect to URL when Cancle button clik .',
348 'size' => CRM_Utils_Type
::HUGE
,
350 'is_cms_user' => array(
351 'name' => 'is_cms_user',
352 'type' => CRM_Utils_Type
::T_BOOLEAN
,
353 'title' => ts('Create CMS User?') ,
354 'description' => 'Should we create a cms user for this profile ',
358 'type' => CRM_Utils_Type
::T_TEXT
,
359 'title' => ts('Notify on Profile Submit') ,
361 'is_reserved' => array(
362 'name' => 'is_reserved',
363 'type' => CRM_Utils_Type
::T_BOOLEAN
,
364 'title' => ts('Profile Is Reserved') ,
365 'description' => 'Is this group reserved for use by some other CiviCRM functionality?',
369 'type' => CRM_Utils_Type
::T_STRING
,
370 'title' => ts('Profile Name') ,
371 'description' => 'Name of the UF group for directly addressing it in the codebase',
373 'size' => CRM_Utils_Type
::BIG
,
375 'created_id' => array(
376 'name' => 'created_id',
377 'type' => CRM_Utils_Type
::T_INT
,
378 'title' => ts('Profile Created By') ,
379 'description' => 'FK to civicrm_contact, who created this UF group',
380 'FKClassName' => 'CRM_Contact_DAO_Contact',
382 'created_date' => array(
383 'name' => 'created_date',
384 'type' => CRM_Utils_Type
::T_DATE + CRM_Utils_Type
::T_TIME
,
385 'title' => ts('UF Group Created Date') ,
386 'description' => 'Date and time this UF group was created.',
388 'is_proximity_search' => array(
389 'name' => 'is_proximity_search',
390 'type' => CRM_Utils_Type
::T_BOOLEAN
,
391 'title' => ts('Include Proximity Search?') ,
392 'description' => 'Should we include proximity search feature in this profile search form?',
395 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
397 return Civi
::$statics[__CLASS__
]['fields'];
400 * Return a mapping from field-name to the corresponding key (as used in fields()).
403 * Array(string $name => string $uniqueName).
405 static function &fieldKeys() {
406 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
407 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
409 return Civi
::$statics[__CLASS__
]['fieldKeys'];
412 * Returns the names of this table
416 static function getTableName() {
417 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
420 * Returns if this table needs to be logged
428 * Returns the list of fields that can be imported
430 * @param bool $prefix
434 static function &import($prefix = false) {
435 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'uf_group', $prefix, array());
439 * Returns the list of fields that can be exported
441 * @param bool $prefix
445 static function &export($prefix = false) {
446 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'uf_group', $prefix, array());