Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
ca5cec67 | 5 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Core/UFGroup.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
f29bf4f3 | 9 | * (GenCodeChecksum:17f8c18034495ef7294802e4597b06f3) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the UFGroup entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Core_DAO_UFGroup extends CRM_Core_DAO { |
c3fc2621 | 16 | |
e501603b | 17 | /** |
f41f0342 | 18 | * Static instance to hold the table name. |
e501603b TO |
19 | * |
20 | * @var string | |
21 | */ | |
fa45b5b9 | 22 | public static $_tableName = 'civicrm_uf_group'; |
c3fc2621 | 23 | |
e501603b | 24 | /** |
f41f0342 | 25 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b | 26 | * |
c3fc2621 | 27 | * @var bool |
e501603b | 28 | */ |
fa45b5b9 | 29 | public static $_log = TRUE; |
c3fc2621 | 30 | |
e501603b TO |
31 | /** |
32 | * Unique table ID | |
33 | * | |
e6ca0a57 | 34 | * @var int |
e501603b TO |
35 | */ |
36 | public $id; | |
c3fc2621 | 37 | |
e501603b TO |
38 | /** |
39 | * Is this form currently active? If false, hide all related fields for all sharing contexts. | |
40 | * | |
e6ca0a57 | 41 | * @var bool |
e501603b TO |
42 | */ |
43 | public $is_active; | |
c3fc2621 | 44 | |
e501603b | 45 | /** |
dd3ec98b | 46 | * Comma separated list of the type(s) of profile fields. |
e501603b TO |
47 | * |
48 | * @var string | |
49 | */ | |
50 | public $group_type; | |
c3fc2621 | 51 | |
e501603b TO |
52 | /** |
53 | * Form title. | |
54 | * | |
55 | * @var string | |
56 | */ | |
57 | public $title; | |
c3fc2621 | 58 | |
bf48be46 SL |
59 | /** |
60 | * Profile Form Public title | |
61 | * | |
62 | * @var string | |
63 | */ | |
64 | public $frontend_title; | |
65 | ||
e501603b TO |
66 | /** |
67 | * Optional verbose description of the profile. | |
68 | * | |
69 | * @var text | |
70 | */ | |
71 | public $description; | |
c3fc2621 | 72 | |
e501603b TO |
73 | /** |
74 | * Description and/or help text to display before fields in form. | |
75 | * | |
76 | * @var text | |
77 | */ | |
78 | public $help_pre; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * Description and/or help text to display after fields in form. | |
82 | * | |
83 | * @var text | |
84 | */ | |
85 | public $help_post; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * Group id, foreign key from civicrm_group | |
89 | * | |
e6ca0a57 | 90 | * @var int |
e501603b TO |
91 | */ |
92 | public $limit_listings_group_id; | |
c3fc2621 | 93 | |
e501603b TO |
94 | /** |
95 | * Redirect to URL. | |
96 | * | |
97 | * @var string | |
98 | */ | |
99 | public $post_URL; | |
c3fc2621 | 100 | |
e501603b TO |
101 | /** |
102 | * foreign key to civicrm_group_id | |
103 | * | |
e6ca0a57 | 104 | * @var int |
e501603b TO |
105 | */ |
106 | public $add_to_group_id; | |
c3fc2621 | 107 | |
e501603b TO |
108 | /** |
109 | * Should a CAPTCHA widget be included this Profile form. | |
110 | * | |
e6ca0a57 | 111 | * @var bool |
e501603b TO |
112 | */ |
113 | public $add_captcha; | |
c3fc2621 | 114 | |
e501603b TO |
115 | /** |
116 | * Do we want to map results from this profile. | |
117 | * | |
e6ca0a57 | 118 | * @var bool |
e501603b TO |
119 | */ |
120 | public $is_map; | |
c3fc2621 | 121 | |
e501603b TO |
122 | /** |
123 | * Should edit link display in profile selector | |
124 | * | |
e6ca0a57 | 125 | * @var bool |
e501603b TO |
126 | */ |
127 | public $is_edit_link; | |
c3fc2621 | 128 | |
e501603b TO |
129 | /** |
130 | * Should we display a link to the website profile in profile selector | |
131 | * | |
e6ca0a57 | 132 | * @var bool |
e501603b TO |
133 | */ |
134 | public $is_uf_link; | |
c3fc2621 | 135 | |
e501603b TO |
136 | /** |
137 | * Should we update the contact record if we find a duplicate | |
138 | * | |
e6ca0a57 | 139 | * @var bool |
e501603b TO |
140 | */ |
141 | public $is_update_dupe; | |
c3fc2621 | 142 | |
e501603b TO |
143 | /** |
144 | * Redirect to URL when Cancle button clik . | |
145 | * | |
146 | * @var string | |
147 | */ | |
148 | public $cancel_URL; | |
c3fc2621 | 149 | |
e501603b TO |
150 | /** |
151 | * Should we create a cms user for this profile | |
152 | * | |
e6ca0a57 | 153 | * @var bool |
e501603b TO |
154 | */ |
155 | public $is_cms_user; | |
c3fc2621 | 156 | |
e501603b | 157 | /** |
e501603b TO |
158 | * @var text |
159 | */ | |
160 | public $notify; | |
c3fc2621 | 161 | |
e501603b TO |
162 | /** |
163 | * Is this group reserved for use by some other CiviCRM functionality? | |
164 | * | |
e6ca0a57 | 165 | * @var bool |
e501603b TO |
166 | */ |
167 | public $is_reserved; | |
c3fc2621 | 168 | |
e501603b TO |
169 | /** |
170 | * Name of the UF group for directly addressing it in the codebase | |
171 | * | |
172 | * @var string | |
173 | */ | |
174 | public $name; | |
c3fc2621 | 175 | |
e501603b TO |
176 | /** |
177 | * FK to civicrm_contact, who created this UF group | |
178 | * | |
e6ca0a57 | 179 | * @var int |
e501603b TO |
180 | */ |
181 | public $created_id; | |
c3fc2621 | 182 | |
e501603b TO |
183 | /** |
184 | * Date and time this UF group was created. | |
185 | * | |
186 | * @var datetime | |
187 | */ | |
188 | public $created_date; | |
c3fc2621 | 189 | |
e501603b TO |
190 | /** |
191 | * Should we include proximity search feature in this profile search form? | |
192 | * | |
e6ca0a57 | 193 | * @var bool |
e501603b TO |
194 | */ |
195 | public $is_proximity_search; | |
c3fc2621 | 196 | |
41ace555 SL |
197 | /** |
198 | * Custom Text to display on the Cancel button when used in create or edit mode | |
199 | * | |
200 | * @var string | |
201 | */ | |
202 | public $cancel_button_text; | |
c3fc2621 | 203 | |
41ace555 SL |
204 | /** |
205 | * Custom Text to display on the submit button on profile edit/create screens | |
206 | * | |
207 | * @var string | |
208 | */ | |
209 | public $submit_button_text; | |
c3fc2621 | 210 | |
b3f1028c JP |
211 | /** |
212 | * Should a Cancel button be included in this Profile form. | |
213 | * | |
e6ca0a57 | 214 | * @var bool |
b3f1028c JP |
215 | */ |
216 | public $add_cancel_button; | |
217 | ||
e501603b | 218 | /** |
f41f0342 | 219 | * Class constructor. |
e501603b | 220 | */ |
c3fc2621 | 221 | public function __construct() { |
e501603b TO |
222 | $this->__table = 'civicrm_uf_group'; |
223 | parent::__construct(); | |
224 | } | |
c3fc2621 | 225 | |
e501603b | 226 | /** |
f41f0342 | 227 | * Returns foreign keys and entity references. |
e501603b TO |
228 | * |
229 | * @return array | |
230 | * [CRM_Core_Reference_Interface] | |
231 | */ | |
c3fc2621 | 232 | public static function getReferenceColumns() { |
346aaaba | 233 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
fa45b5b9 | 234 | Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); |
c3fc2621 CW |
235 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'limit_listings_group_id', 'civicrm_group', 'id'); |
236 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'add_to_group_id', 'civicrm_group', 'id'); | |
237 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'created_id', 'civicrm_contact', 'id'); | |
346aaaba | 238 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 239 | } |
346aaaba | 240 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 241 | } |
c3fc2621 | 242 | |
e501603b TO |
243 | /** |
244 | * Returns all the column names of this table | |
245 | * | |
246 | * @return array | |
247 | */ | |
c3fc2621 | 248 | public static function &fields() { |
346aaaba | 249 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
250 | Civi::$statics[__CLASS__]['fields'] = [ |
251 | 'id' => [ | |
e501603b TO |
252 | 'name' => 'id', |
253 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 254 | 'title' => ts('Profile ID'), |
215b423e | 255 | 'description' => ts('Unique table ID'), |
c3fc2621 | 256 | 'required' => TRUE, |
a36434b9 | 257 | 'where' => 'civicrm_uf_group.id', |
522a26c9 | 258 | 'table_name' => 'civicrm_uf_group', |
259 | 'entity' => 'UFGroup', | |
260 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 261 | 'localizable' => 0, |
c3fc2621 CW |
262 | ], |
263 | 'is_active' => [ | |
e501603b TO |
264 | 'name' => 'is_active', |
265 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 266 | 'title' => ts('Profile Is Active'), |
215b423e | 267 | 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'), |
a36434b9 | 268 | 'where' => 'civicrm_uf_group.is_active', |
e501603b | 269 | 'default' => '1', |
522a26c9 | 270 | 'table_name' => 'civicrm_uf_group', |
271 | 'entity' => 'UFGroup', | |
272 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 273 | 'localizable' => 0, |
c3fc2621 CW |
274 | ], |
275 | 'group_type' => [ | |
e501603b TO |
276 | 'name' => 'group_type', |
277 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 278 | 'title' => ts('Profile Group Type'), |
215b423e | 279 | 'description' => ts('Comma separated list of the type(s) of profile fields.'), |
e501603b TO |
280 | 'maxlength' => 255, |
281 | 'size' => CRM_Utils_Type::HUGE, | |
c3fc2621 | 282 | 'import' => TRUE, |
e501603b | 283 | 'where' => 'civicrm_uf_group.group_type', |
c3fc2621 | 284 | 'export' => TRUE, |
522a26c9 | 285 | 'table_name' => 'civicrm_uf_group', |
286 | 'entity' => 'UFGroup', | |
287 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 288 | 'localizable' => 0, |
dd3ec98b | 289 | 'serialize' => self::SERIALIZE_COMMA, |
c3fc2621 CW |
290 | ], |
291 | 'title' => [ | |
e501603b TO |
292 | 'name' => 'title', |
293 | 'type' => CRM_Utils_Type::T_STRING, | |
7f3c8b3d | 294 | 'title' => ts('Profile Name'), |
215b423e | 295 | 'description' => ts('Form title.'), |
c3fc2621 | 296 | 'required' => TRUE, |
e501603b TO |
297 | 'maxlength' => 64, |
298 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 299 | 'where' => 'civicrm_uf_group.title', |
522a26c9 | 300 | 'table_name' => 'civicrm_uf_group', |
301 | 'entity' => 'UFGroup', | |
302 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 303 | 'localizable' => 1, |
7f3c8b3d | 304 | 'html' => [ |
305 | 'type' => 'Text', | |
306 | ], | |
c3fc2621 | 307 | ], |
bf48be46 SL |
308 | 'frontend_title' => [ |
309 | 'name' => 'frontend_title', | |
310 | 'type' => CRM_Utils_Type::T_STRING, | |
7f3c8b3d | 311 | 'title' => ts('Public Title'), |
215b423e | 312 | 'description' => ts('Profile Form Public title'), |
bf48be46 SL |
313 | 'maxlength' => 64, |
314 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 315 | 'where' => 'civicrm_uf_group.frontend_title', |
bf48be46 SL |
316 | 'table_name' => 'civicrm_uf_group', |
317 | 'entity' => 'UFGroup', | |
318 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
319 | 'localizable' => 1, | |
7f3c8b3d | 320 | 'html' => [ |
321 | 'type' => 'Text', | |
322 | ], | |
bf48be46 | 323 | ], |
c3fc2621 | 324 | 'description' => [ |
e501603b TO |
325 | 'name' => 'description', |
326 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 327 | 'title' => ts('Profile Description'), |
215b423e | 328 | 'description' => ts('Optional verbose description of the profile.'), |
e501603b TO |
329 | 'rows' => 2, |
330 | 'cols' => 60, | |
a36434b9 | 331 | 'where' => 'civicrm_uf_group.description', |
522a26c9 | 332 | 'table_name' => 'civicrm_uf_group', |
333 | 'entity' => 'UFGroup', | |
334 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 335 | 'localizable' => 0, |
c3fc2621 | 336 | 'html' => [ |
e501603b | 337 | 'type' => 'TextArea', |
c3fc2621 CW |
338 | ], |
339 | ], | |
340 | 'help_pre' => [ | |
e501603b TO |
341 | 'name' => 'help_pre', |
342 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 343 | 'title' => ts('Help Pre'), |
215b423e | 344 | 'description' => ts('Description and/or help text to display before fields in form.'), |
e501603b TO |
345 | 'rows' => 4, |
346 | 'cols' => 80, | |
a36434b9 | 347 | 'where' => 'civicrm_uf_group.help_pre', |
522a26c9 | 348 | 'table_name' => 'civicrm_uf_group', |
349 | 'entity' => 'UFGroup', | |
350 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 351 | 'localizable' => 1, |
c3fc2621 | 352 | 'html' => [ |
e501603b | 353 | 'type' => 'TextArea', |
c3fc2621 CW |
354 | ], |
355 | ], | |
356 | 'help_post' => [ | |
e501603b TO |
357 | 'name' => 'help_post', |
358 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 359 | 'title' => ts('Profile Post Text'), |
215b423e | 360 | 'description' => ts('Description and/or help text to display after fields in form.'), |
e501603b TO |
361 | 'rows' => 4, |
362 | 'cols' => 80, | |
a36434b9 | 363 | 'where' => 'civicrm_uf_group.help_post', |
522a26c9 | 364 | 'table_name' => 'civicrm_uf_group', |
365 | 'entity' => 'UFGroup', | |
366 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 367 | 'localizable' => 1, |
c3fc2621 | 368 | 'html' => [ |
e501603b | 369 | 'type' => 'TextArea', |
c3fc2621 CW |
370 | ], |
371 | ], | |
372 | 'limit_listings_group_id' => [ | |
e501603b TO |
373 | 'name' => 'limit_listings_group_id', |
374 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 375 | 'title' => ts('Profile Search Limit Group'), |
215b423e | 376 | 'description' => ts('Group id, foreign key from civicrm_group'), |
a36434b9 | 377 | 'where' => 'civicrm_uf_group.limit_listings_group_id', |
522a26c9 | 378 | 'table_name' => 'civicrm_uf_group', |
379 | 'entity' => 'UFGroup', | |
380 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 381 | 'localizable' => 0, |
e501603b | 382 | 'FKClassName' => 'CRM_Contact_DAO_Group', |
c3fc2621 CW |
383 | ], |
384 | 'post_URL' => [ | |
e501603b TO |
385 | 'name' => 'post_URL', |
386 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 387 | 'title' => ts('Post Url'), |
215b423e | 388 | 'description' => ts('Redirect to URL.'), |
e501603b TO |
389 | 'maxlength' => 255, |
390 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 391 | 'where' => 'civicrm_uf_group.post_URL', |
522a26c9 | 392 | 'table_name' => 'civicrm_uf_group', |
393 | 'entity' => 'UFGroup', | |
394 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 395 | 'localizable' => 0, |
c3fc2621 CW |
396 | ], |
397 | 'add_to_group_id' => [ | |
e501603b TO |
398 | 'name' => 'add_to_group_id', |
399 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 400 | 'title' => ts('Add Contact To Group'), |
215b423e | 401 | 'description' => ts('foreign key to civicrm_group_id'), |
a36434b9 | 402 | 'where' => 'civicrm_uf_group.add_to_group_id', |
522a26c9 | 403 | 'table_name' => 'civicrm_uf_group', |
404 | 'entity' => 'UFGroup', | |
405 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 406 | 'localizable' => 0, |
e501603b | 407 | 'FKClassName' => 'CRM_Contact_DAO_Group', |
c3fc2621 CW |
408 | ], |
409 | 'add_captcha' => [ | |
e501603b TO |
410 | 'name' => 'add_captcha', |
411 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 412 | 'title' => ts('Show Captcha On Profile'), |
215b423e | 413 | 'description' => ts('Should a CAPTCHA widget be included this Profile form.'), |
a36434b9 | 414 | 'where' => 'civicrm_uf_group.add_captcha', |
45a83e42 | 415 | 'default' => '0', |
522a26c9 | 416 | 'table_name' => 'civicrm_uf_group', |
417 | 'entity' => 'UFGroup', | |
418 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 419 | 'localizable' => 0, |
c3fc2621 CW |
420 | ], |
421 | 'is_map' => [ | |
e501603b TO |
422 | 'name' => 'is_map', |
423 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 424 | 'title' => ts('Map Profile'), |
215b423e | 425 | 'description' => ts('Do we want to map results from this profile.'), |
a36434b9 | 426 | 'where' => 'civicrm_uf_group.is_map', |
45a83e42 | 427 | 'default' => '0', |
522a26c9 | 428 | 'table_name' => 'civicrm_uf_group', |
429 | 'entity' => 'UFGroup', | |
430 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 431 | 'localizable' => 0, |
c3fc2621 CW |
432 | ], |
433 | 'is_edit_link' => [ | |
e501603b TO |
434 | 'name' => 'is_edit_link', |
435 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 436 | 'title' => ts('Show Edit Link?'), |
215b423e | 437 | 'description' => ts('Should edit link display in profile selector'), |
a36434b9 | 438 | 'where' => 'civicrm_uf_group.is_edit_link', |
45a83e42 | 439 | 'default' => '0', |
522a26c9 | 440 | 'table_name' => 'civicrm_uf_group', |
441 | 'entity' => 'UFGroup', | |
442 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 443 | 'localizable' => 0, |
c3fc2621 CW |
444 | ], |
445 | 'is_uf_link' => [ | |
e501603b TO |
446 | 'name' => 'is_uf_link', |
447 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 448 | 'title' => ts('Show Link to CMS User'), |
215b423e | 449 | 'description' => ts('Should we display a link to the website profile in profile selector'), |
a36434b9 | 450 | 'where' => 'civicrm_uf_group.is_uf_link', |
45a83e42 | 451 | 'default' => '0', |
522a26c9 | 452 | 'table_name' => 'civicrm_uf_group', |
453 | 'entity' => 'UFGroup', | |
454 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 455 | 'localizable' => 0, |
c3fc2621 CW |
456 | ], |
457 | 'is_update_dupe' => [ | |
e501603b TO |
458 | 'name' => 'is_update_dupe', |
459 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 460 | 'title' => ts('Update on Duplicate'), |
215b423e | 461 | 'description' => ts('Should we update the contact record if we find a duplicate'), |
a36434b9 | 462 | 'where' => 'civicrm_uf_group.is_update_dupe', |
45a83e42 | 463 | 'default' => '0', |
522a26c9 | 464 | 'table_name' => 'civicrm_uf_group', |
465 | 'entity' => 'UFGroup', | |
466 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 467 | 'localizable' => 0, |
c3fc2621 CW |
468 | ], |
469 | 'cancel_URL' => [ | |
e501603b TO |
470 | 'name' => 'cancel_URL', |
471 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 472 | 'title' => ts('Profile Cancel URL'), |
215b423e | 473 | 'description' => ts('Redirect to URL when Cancle button clik .'), |
e501603b TO |
474 | 'maxlength' => 255, |
475 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 476 | 'where' => 'civicrm_uf_group.cancel_URL', |
522a26c9 | 477 | 'table_name' => 'civicrm_uf_group', |
478 | 'entity' => 'UFGroup', | |
479 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 480 | 'localizable' => 0, |
c3fc2621 CW |
481 | ], |
482 | 'is_cms_user' => [ | |
e501603b TO |
483 | 'name' => 'is_cms_user', |
484 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 485 | 'title' => ts('Create CMS User?'), |
215b423e | 486 | 'description' => ts('Should we create a cms user for this profile '), |
a36434b9 | 487 | 'where' => 'civicrm_uf_group.is_cms_user', |
45a83e42 | 488 | 'default' => '0', |
522a26c9 | 489 | 'table_name' => 'civicrm_uf_group', |
490 | 'entity' => 'UFGroup', | |
491 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 492 | 'localizable' => 0, |
c3fc2621 CW |
493 | ], |
494 | 'notify' => [ | |
e501603b TO |
495 | 'name' => 'notify', |
496 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 497 | 'title' => ts('Notify on Profile Submit'), |
a36434b9 | 498 | 'where' => 'civicrm_uf_group.notify', |
522a26c9 | 499 | 'table_name' => 'civicrm_uf_group', |
500 | 'entity' => 'UFGroup', | |
501 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 502 | 'localizable' => 0, |
c3fc2621 CW |
503 | ], |
504 | 'is_reserved' => [ | |
e501603b TO |
505 | 'name' => 'is_reserved', |
506 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 507 | 'title' => ts('Profile Is Reserved'), |
215b423e | 508 | 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'), |
a36434b9 | 509 | 'where' => 'civicrm_uf_group.is_reserved', |
522a26c9 | 510 | 'table_name' => 'civicrm_uf_group', |
511 | 'entity' => 'UFGroup', | |
512 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 513 | 'localizable' => 0, |
c3fc2621 CW |
514 | ], |
515 | 'name' => [ | |
e501603b TO |
516 | 'name' => 'name', |
517 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 518 | 'title' => ts('Profile Name'), |
215b423e | 519 | 'description' => ts('Name of the UF group for directly addressing it in the codebase'), |
e501603b TO |
520 | 'maxlength' => 64, |
521 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 522 | 'where' => 'civicrm_uf_group.name', |
522a26c9 | 523 | 'table_name' => 'civicrm_uf_group', |
524 | 'entity' => 'UFGroup', | |
525 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 526 | 'localizable' => 0, |
c3fc2621 CW |
527 | ], |
528 | 'created_id' => [ | |
e501603b TO |
529 | 'name' => 'created_id', |
530 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 531 | 'title' => ts('Profile Created By'), |
215b423e | 532 | 'description' => ts('FK to civicrm_contact, who created this UF group'), |
a36434b9 | 533 | 'where' => 'civicrm_uf_group.created_id', |
522a26c9 | 534 | 'table_name' => 'civicrm_uf_group', |
535 | 'entity' => 'UFGroup', | |
536 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 537 | 'localizable' => 0, |
e501603b | 538 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
539 | ], |
540 | 'created_date' => [ | |
e501603b TO |
541 | 'name' => 'created_date', |
542 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 543 | 'title' => ts('UF Group Created Date'), |
215b423e | 544 | 'description' => ts('Date and time this UF group was created.'), |
a36434b9 | 545 | 'where' => 'civicrm_uf_group.created_date', |
522a26c9 | 546 | 'table_name' => 'civicrm_uf_group', |
547 | 'entity' => 'UFGroup', | |
548 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 549 | 'localizable' => 0, |
c3fc2621 CW |
550 | ], |
551 | 'is_proximity_search' => [ | |
e501603b TO |
552 | 'name' => 'is_proximity_search', |
553 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 554 | 'title' => ts('Include Proximity Search?'), |
215b423e | 555 | 'description' => ts('Should we include proximity search feature in this profile search form?'), |
a36434b9 | 556 | 'where' => 'civicrm_uf_group.is_proximity_search', |
45a83e42 | 557 | 'default' => '0', |
522a26c9 | 558 | 'table_name' => 'civicrm_uf_group', |
559 | 'entity' => 'UFGroup', | |
560 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 561 | 'localizable' => 0, |
c3fc2621 CW |
562 | ], |
563 | 'cancel_button_text' => [ | |
41ace555 SL |
564 | 'name' => 'cancel_button_text', |
565 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 566 | 'title' => ts('Cancel Button Text'), |
215b423e | 567 | 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'), |
41ace555 SL |
568 | 'maxlength' => 64, |
569 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 570 | 'where' => 'civicrm_uf_group.cancel_button_text', |
41ace555 SL |
571 | 'default' => 'NULL', |
572 | 'table_name' => 'civicrm_uf_group', | |
573 | 'entity' => 'UFGroup', | |
574 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
575 | 'localizable' => 1, | |
5e59ce48 SL |
576 | 'html' => [ |
577 | 'type' => 'Text', | |
578 | ], | |
c3fc2621 CW |
579 | ], |
580 | 'submit_button_text' => [ | |
41ace555 SL |
581 | 'name' => 'submit_button_text', |
582 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 583 | 'title' => ts('Submit Button Text'), |
215b423e | 584 | 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'), |
41ace555 SL |
585 | 'maxlength' => 64, |
586 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 587 | 'where' => 'civicrm_uf_group.submit_button_text', |
41ace555 SL |
588 | 'default' => 'NULL', |
589 | 'table_name' => 'civicrm_uf_group', | |
590 | 'entity' => 'UFGroup', | |
591 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
592 | 'localizable' => 1, | |
5e59ce48 SL |
593 | 'html' => [ |
594 | 'type' => 'Text', | |
595 | ], | |
c3fc2621 | 596 | ], |
b3f1028c JP |
597 | 'add_cancel_button' => [ |
598 | 'name' => 'add_cancel_button', | |
599 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
600 | 'title' => ts('Include Cancel Button'), | |
215b423e | 601 | 'description' => ts('Should a Cancel button be included in this Profile form.'), |
a36434b9 | 602 | 'where' => 'civicrm_uf_group.add_cancel_button', |
b3f1028c JP |
603 | 'default' => '1', |
604 | 'table_name' => 'civicrm_uf_group', | |
605 | 'entity' => 'UFGroup', | |
606 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
607 | 'localizable' => 0, | |
608 | ], | |
c3fc2621 | 609 | ]; |
346aaaba | 610 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 611 | } |
346aaaba | 612 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 613 | } |
c3fc2621 | 614 | |
e501603b | 615 | /** |
bd8e0b14 | 616 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
617 | * |
618 | * @return array | |
bd8e0b14 | 619 | * Array(string $name => string $uniqueName). |
e501603b | 620 | */ |
c3fc2621 | 621 | public static function &fieldKeys() { |
bd8e0b14 TO |
622 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
623 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 624 | } |
bd8e0b14 | 625 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 626 | } |
c3fc2621 | 627 | |
e501603b TO |
628 | /** |
629 | * Returns the names of this table | |
630 | * | |
631 | * @return string | |
632 | */ | |
c3fc2621 | 633 | public static function getTableName() { |
e501603b TO |
634 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
635 | } | |
c3fc2621 | 636 | |
e501603b TO |
637 | /** |
638 | * Returns if this table needs to be logged | |
639 | * | |
c3fc2621 | 640 | * @return bool |
e501603b | 641 | */ |
c3fc2621 | 642 | public function getLog() { |
e501603b TO |
643 | return self::$_log; |
644 | } | |
c3fc2621 | 645 | |
e501603b TO |
646 | /** |
647 | * Returns the list of fields that can be imported | |
648 | * | |
649 | * @param bool $prefix | |
650 | * | |
651 | * @return array | |
652 | */ | |
c3fc2621 CW |
653 | public static function &import($prefix = FALSE) { |
654 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_group', $prefix, []); | |
60808919 | 655 | return $r; |
e501603b | 656 | } |
c3fc2621 | 657 | |
e501603b TO |
658 | /** |
659 | * Returns the list of fields that can be exported | |
660 | * | |
661 | * @param bool $prefix | |
662 | * | |
663 | * @return array | |
664 | */ | |
c3fc2621 CW |
665 | public static function &export($prefix = FALSE) { |
666 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_group', $prefix, []); | |
60808919 | 667 | return $r; |
e501603b | 668 | } |
c3fc2621 | 669 | |
e7a6b91a AS |
670 | /** |
671 | * Returns the list of indices | |
c3fc2621 CW |
672 | * |
673 | * @param bool $localize | |
674 | * | |
675 | * @return array | |
e7a6b91a AS |
676 | */ |
677 | public static function indices($localize = TRUE) { | |
c3fc2621 CW |
678 | $indices = [ |
679 | 'UI_name' => [ | |
e7a6b91a | 680 | 'name' => 'UI_name', |
c3fc2621 | 681 | 'field' => [ |
e7a6b91a | 682 | 0 => 'name', |
c3fc2621 CW |
683 | ], |
684 | 'localizable' => FALSE, | |
685 | 'unique' => TRUE, | |
e7a6b91a | 686 | 'sig' => 'civicrm_uf_group::1::name', |
c3fc2621 CW |
687 | ], |
688 | ]; | |
e7a6b91a AS |
689 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
690 | } | |
c3fc2621 | 691 | |
e501603b | 692 | } |