Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
8c9251b3 | 5 | * @copyright CiviCRM LLC (c) 2004-2018 |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Core/UFGroup.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
e380ee3b | 9 | * (GenCodeChecksum:e5e629c4f6d56d238b4ac28e822cea8a) |
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 | */ | |
22 | 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 | */ |
c3fc2621 CW |
29 | static $_log = TRUE; |
30 | ||
e501603b TO |
31 | /** |
32 | * Unique table ID | |
33 | * | |
34 | * @var int unsigned | |
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 | * | |
41 | * @var boolean | |
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 | * | |
90 | * @var int unsigned | |
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 | * | |
104 | * @var int unsigned | |
105 | */ | |
106 | public $add_to_group_id; | |
c3fc2621 | 107 | |
e501603b TO |
108 | /** |
109 | * Should a CAPTCHA widget be included this Profile form. | |
110 | * | |
111 | * @var boolean | |
112 | */ | |
113 | public $add_captcha; | |
c3fc2621 | 114 | |
e501603b TO |
115 | /** |
116 | * Do we want to map results from this profile. | |
117 | * | |
118 | * @var boolean | |
119 | */ | |
120 | public $is_map; | |
c3fc2621 | 121 | |
e501603b TO |
122 | /** |
123 | * Should edit link display in profile selector | |
124 | * | |
125 | * @var boolean | |
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 | * | |
132 | * @var boolean | |
133 | */ | |
134 | public $is_uf_link; | |
c3fc2621 | 135 | |
e501603b TO |
136 | /** |
137 | * Should we update the contact record if we find a duplicate | |
138 | * | |
139 | * @var boolean | |
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 | * | |
153 | * @var boolean | |
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 | * | |
165 | * @var boolean | |
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 | * | |
179 | * @var int unsigned | |
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 | * | |
193 | * @var boolean | |
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 | * | |
214 | * @var boolean | |
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 TO |
233 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
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, |
522a26c9 | 257 | 'table_name' => 'civicrm_uf_group', |
258 | 'entity' => 'UFGroup', | |
259 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 260 | 'localizable' => 0, |
c3fc2621 CW |
261 | ], |
262 | 'is_active' => [ | |
e501603b TO |
263 | 'name' => 'is_active', |
264 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 265 | 'title' => ts('Profile Is Active'), |
215b423e | 266 | 'description' => ts('Is this form currently active? If false, hide all related fields for all sharing contexts.'), |
e501603b | 267 | 'default' => '1', |
522a26c9 | 268 | 'table_name' => 'civicrm_uf_group', |
269 | 'entity' => 'UFGroup', | |
270 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 271 | 'localizable' => 0, |
c3fc2621 CW |
272 | ], |
273 | 'group_type' => [ | |
e501603b TO |
274 | 'name' => 'group_type', |
275 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 276 | 'title' => ts('Profile Group Type'), |
215b423e | 277 | 'description' => ts('Comma separated list of the type(s) of profile fields.'), |
e501603b TO |
278 | 'maxlength' => 255, |
279 | 'size' => CRM_Utils_Type::HUGE, | |
c3fc2621 | 280 | 'import' => TRUE, |
e501603b TO |
281 | 'where' => 'civicrm_uf_group.group_type', |
282 | 'headerPattern' => '', | |
283 | 'dataPattern' => '', | |
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, | |
522a26c9 | 299 | 'table_name' => 'civicrm_uf_group', |
300 | 'entity' => 'UFGroup', | |
301 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 302 | 'localizable' => 1, |
7f3c8b3d | 303 | 'html' => [ |
304 | 'type' => 'Text', | |
305 | ], | |
c3fc2621 | 306 | ], |
bf48be46 SL |
307 | 'frontend_title' => [ |
308 | 'name' => 'frontend_title', | |
309 | 'type' => CRM_Utils_Type::T_STRING, | |
7f3c8b3d | 310 | 'title' => ts('Public Title'), |
215b423e | 311 | 'description' => ts('Profile Form Public title'), |
bf48be46 SL |
312 | 'maxlength' => 64, |
313 | 'size' => CRM_Utils_Type::BIG, | |
314 | 'table_name' => 'civicrm_uf_group', | |
315 | 'entity' => 'UFGroup', | |
316 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
317 | 'localizable' => 1, | |
7f3c8b3d | 318 | 'html' => [ |
319 | 'type' => 'Text', | |
320 | ], | |
bf48be46 | 321 | ], |
c3fc2621 | 322 | 'description' => [ |
e501603b TO |
323 | 'name' => 'description', |
324 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 325 | 'title' => ts('Profile Description'), |
215b423e | 326 | 'description' => ts('Optional verbose description of the profile.'), |
e501603b TO |
327 | 'rows' => 2, |
328 | 'cols' => 60, | |
522a26c9 | 329 | 'table_name' => 'civicrm_uf_group', |
330 | 'entity' => 'UFGroup', | |
331 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 332 | 'localizable' => 0, |
c3fc2621 | 333 | 'html' => [ |
e501603b | 334 | 'type' => 'TextArea', |
c3fc2621 CW |
335 | ], |
336 | ], | |
337 | 'help_pre' => [ | |
e501603b TO |
338 | 'name' => 'help_pre', |
339 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 340 | 'title' => ts('Help Pre'), |
215b423e | 341 | 'description' => ts('Description and/or help text to display before fields in form.'), |
e501603b TO |
342 | 'rows' => 4, |
343 | 'cols' => 80, | |
522a26c9 | 344 | 'table_name' => 'civicrm_uf_group', |
345 | 'entity' => 'UFGroup', | |
346 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 347 | 'localizable' => 1, |
c3fc2621 | 348 | 'html' => [ |
e501603b | 349 | 'type' => 'TextArea', |
c3fc2621 CW |
350 | ], |
351 | ], | |
352 | 'help_post' => [ | |
e501603b TO |
353 | 'name' => 'help_post', |
354 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 355 | 'title' => ts('Profile Post Text'), |
215b423e | 356 | 'description' => ts('Description and/or help text to display after fields in form.'), |
e501603b TO |
357 | 'rows' => 4, |
358 | 'cols' => 80, | |
522a26c9 | 359 | 'table_name' => 'civicrm_uf_group', |
360 | 'entity' => 'UFGroup', | |
361 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 362 | 'localizable' => 1, |
c3fc2621 | 363 | 'html' => [ |
e501603b | 364 | 'type' => 'TextArea', |
c3fc2621 CW |
365 | ], |
366 | ], | |
367 | 'limit_listings_group_id' => [ | |
e501603b TO |
368 | 'name' => 'limit_listings_group_id', |
369 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 370 | 'title' => ts('Profile Search Limit Group'), |
215b423e | 371 | 'description' => ts('Group id, foreign key from civicrm_group'), |
522a26c9 | 372 | 'table_name' => 'civicrm_uf_group', |
373 | 'entity' => 'UFGroup', | |
374 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 375 | 'localizable' => 0, |
e501603b | 376 | 'FKClassName' => 'CRM_Contact_DAO_Group', |
c3fc2621 CW |
377 | ], |
378 | 'post_URL' => [ | |
e501603b TO |
379 | 'name' => 'post_URL', |
380 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 381 | 'title' => ts('Post Url'), |
215b423e | 382 | 'description' => ts('Redirect to URL.'), |
e501603b TO |
383 | 'maxlength' => 255, |
384 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 385 | 'table_name' => 'civicrm_uf_group', |
386 | 'entity' => 'UFGroup', | |
387 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 388 | 'localizable' => 0, |
c3fc2621 CW |
389 | ], |
390 | 'add_to_group_id' => [ | |
e501603b TO |
391 | 'name' => 'add_to_group_id', |
392 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 393 | 'title' => ts('Add Contact To Group'), |
215b423e | 394 | 'description' => ts('foreign key to civicrm_group_id'), |
522a26c9 | 395 | 'table_name' => 'civicrm_uf_group', |
396 | 'entity' => 'UFGroup', | |
397 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 398 | 'localizable' => 0, |
e501603b | 399 | 'FKClassName' => 'CRM_Contact_DAO_Group', |
c3fc2621 CW |
400 | ], |
401 | 'add_captcha' => [ | |
e501603b TO |
402 | 'name' => 'add_captcha', |
403 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 404 | 'title' => ts('Show Captcha On Profile'), |
215b423e | 405 | 'description' => ts('Should a CAPTCHA widget be included this Profile form.'), |
45a83e42 | 406 | 'default' => '0', |
522a26c9 | 407 | 'table_name' => 'civicrm_uf_group', |
408 | 'entity' => 'UFGroup', | |
409 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 410 | 'localizable' => 0, |
c3fc2621 CW |
411 | ], |
412 | 'is_map' => [ | |
e501603b TO |
413 | 'name' => 'is_map', |
414 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 415 | 'title' => ts('Map Profile'), |
215b423e | 416 | 'description' => ts('Do we want to map results from this profile.'), |
45a83e42 | 417 | 'default' => '0', |
522a26c9 | 418 | 'table_name' => 'civicrm_uf_group', |
419 | 'entity' => 'UFGroup', | |
420 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 421 | 'localizable' => 0, |
c3fc2621 CW |
422 | ], |
423 | 'is_edit_link' => [ | |
e501603b TO |
424 | 'name' => 'is_edit_link', |
425 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 426 | 'title' => ts('Show Edit Link?'), |
215b423e | 427 | 'description' => ts('Should edit link display in profile selector'), |
45a83e42 | 428 | 'default' => '0', |
522a26c9 | 429 | 'table_name' => 'civicrm_uf_group', |
430 | 'entity' => 'UFGroup', | |
431 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 432 | 'localizable' => 0, |
c3fc2621 CW |
433 | ], |
434 | 'is_uf_link' => [ | |
e501603b TO |
435 | 'name' => 'is_uf_link', |
436 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 437 | 'title' => ts('Show Link to CMS User'), |
215b423e | 438 | 'description' => ts('Should we display a link to the website profile in profile selector'), |
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_update_dupe' => [ | |
e501603b TO |
446 | 'name' => 'is_update_dupe', |
447 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 448 | 'title' => ts('Update on Duplicate'), |
215b423e | 449 | 'description' => ts('Should we update the contact record if we find a duplicate'), |
45a83e42 | 450 | 'default' => '0', |
522a26c9 | 451 | 'table_name' => 'civicrm_uf_group', |
452 | 'entity' => 'UFGroup', | |
453 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 454 | 'localizable' => 0, |
c3fc2621 CW |
455 | ], |
456 | 'cancel_URL' => [ | |
e501603b TO |
457 | 'name' => 'cancel_URL', |
458 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 459 | 'title' => ts('Profile Cancel URL'), |
215b423e | 460 | 'description' => ts('Redirect to URL when Cancle button clik .'), |
e501603b TO |
461 | 'maxlength' => 255, |
462 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 463 | 'table_name' => 'civicrm_uf_group', |
464 | 'entity' => 'UFGroup', | |
465 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 466 | 'localizable' => 0, |
c3fc2621 CW |
467 | ], |
468 | 'is_cms_user' => [ | |
e501603b TO |
469 | 'name' => 'is_cms_user', |
470 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 471 | 'title' => ts('Create CMS User?'), |
215b423e | 472 | 'description' => ts('Should we create a cms user for this profile '), |
45a83e42 | 473 | 'default' => '0', |
522a26c9 | 474 | 'table_name' => 'civicrm_uf_group', |
475 | 'entity' => 'UFGroup', | |
476 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 477 | 'localizable' => 0, |
c3fc2621 CW |
478 | ], |
479 | 'notify' => [ | |
e501603b TO |
480 | 'name' => 'notify', |
481 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 482 | 'title' => ts('Notify on Profile Submit'), |
522a26c9 | 483 | 'table_name' => 'civicrm_uf_group', |
484 | 'entity' => 'UFGroup', | |
485 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 486 | 'localizable' => 0, |
c3fc2621 CW |
487 | ], |
488 | 'is_reserved' => [ | |
e501603b TO |
489 | 'name' => 'is_reserved', |
490 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 491 | 'title' => ts('Profile Is Reserved'), |
215b423e | 492 | 'description' => ts('Is this group reserved for use by some other CiviCRM functionality?'), |
522a26c9 | 493 | 'table_name' => 'civicrm_uf_group', |
494 | 'entity' => 'UFGroup', | |
495 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 496 | 'localizable' => 0, |
c3fc2621 CW |
497 | ], |
498 | 'name' => [ | |
e501603b TO |
499 | 'name' => 'name', |
500 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 501 | 'title' => ts('Profile Name'), |
215b423e | 502 | 'description' => ts('Name of the UF group for directly addressing it in the codebase'), |
e501603b TO |
503 | 'maxlength' => 64, |
504 | 'size' => CRM_Utils_Type::BIG, | |
522a26c9 | 505 | 'table_name' => 'civicrm_uf_group', |
506 | 'entity' => 'UFGroup', | |
507 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 508 | 'localizable' => 0, |
c3fc2621 CW |
509 | ], |
510 | 'created_id' => [ | |
e501603b TO |
511 | 'name' => 'created_id', |
512 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 513 | 'title' => ts('Profile Created By'), |
215b423e | 514 | 'description' => ts('FK to civicrm_contact, who created this UF group'), |
522a26c9 | 515 | 'table_name' => 'civicrm_uf_group', |
516 | 'entity' => 'UFGroup', | |
517 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 518 | 'localizable' => 0, |
e501603b | 519 | 'FKClassName' => 'CRM_Contact_DAO_Contact', |
c3fc2621 CW |
520 | ], |
521 | 'created_date' => [ | |
e501603b TO |
522 | 'name' => 'created_date', |
523 | 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME, | |
c3fc2621 | 524 | 'title' => ts('UF Group Created Date'), |
215b423e | 525 | 'description' => ts('Date and time this UF group was created.'), |
522a26c9 | 526 | 'table_name' => 'civicrm_uf_group', |
527 | 'entity' => 'UFGroup', | |
528 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 529 | 'localizable' => 0, |
c3fc2621 CW |
530 | ], |
531 | 'is_proximity_search' => [ | |
e501603b TO |
532 | 'name' => 'is_proximity_search', |
533 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 534 | 'title' => ts('Include Proximity Search?'), |
215b423e | 535 | 'description' => ts('Should we include proximity search feature in this profile search form?'), |
45a83e42 | 536 | 'default' => '0', |
522a26c9 | 537 | 'table_name' => 'civicrm_uf_group', |
538 | 'entity' => 'UFGroup', | |
539 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
6a7e5e5d | 540 | 'localizable' => 0, |
c3fc2621 CW |
541 | ], |
542 | 'cancel_button_text' => [ | |
41ace555 SL |
543 | 'name' => 'cancel_button_text', |
544 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 545 | 'title' => ts('Cancel Button Text'), |
215b423e | 546 | 'description' => ts('Custom Text to display on the Cancel button when used in create or edit mode'), |
41ace555 SL |
547 | 'maxlength' => 64, |
548 | 'size' => CRM_Utils_Type::BIG, | |
549 | 'default' => 'NULL', | |
550 | 'table_name' => 'civicrm_uf_group', | |
551 | 'entity' => 'UFGroup', | |
552 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
553 | 'localizable' => 1, | |
c3fc2621 CW |
554 | ], |
555 | 'submit_button_text' => [ | |
41ace555 SL |
556 | 'name' => 'submit_button_text', |
557 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 558 | 'title' => ts('Submit Button Text'), |
215b423e | 559 | 'description' => ts('Custom Text to display on the submit button on profile edit/create screens'), |
41ace555 SL |
560 | 'maxlength' => 64, |
561 | 'size' => CRM_Utils_Type::BIG, | |
562 | 'default' => 'NULL', | |
563 | 'table_name' => 'civicrm_uf_group', | |
564 | 'entity' => 'UFGroup', | |
565 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
566 | 'localizable' => 1, | |
c3fc2621 | 567 | ], |
b3f1028c JP |
568 | 'add_cancel_button' => [ |
569 | 'name' => 'add_cancel_button', | |
570 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
571 | 'title' => ts('Include Cancel Button'), | |
215b423e | 572 | 'description' => ts('Should a Cancel button be included in this Profile form.'), |
b3f1028c JP |
573 | 'default' => '1', |
574 | 'table_name' => 'civicrm_uf_group', | |
575 | 'entity' => 'UFGroup', | |
576 | 'bao' => 'CRM_Core_BAO_UFGroup', | |
577 | 'localizable' => 0, | |
578 | ], | |
c3fc2621 | 579 | ]; |
346aaaba | 580 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 581 | } |
346aaaba | 582 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 583 | } |
c3fc2621 | 584 | |
e501603b | 585 | /** |
bd8e0b14 | 586 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
587 | * |
588 | * @return array | |
bd8e0b14 | 589 | * Array(string $name => string $uniqueName). |
e501603b | 590 | */ |
c3fc2621 | 591 | public static function &fieldKeys() { |
bd8e0b14 TO |
592 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
593 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 594 | } |
bd8e0b14 | 595 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 596 | } |
c3fc2621 | 597 | |
e501603b TO |
598 | /** |
599 | * Returns the names of this table | |
600 | * | |
601 | * @return string | |
602 | */ | |
c3fc2621 | 603 | public static function getTableName() { |
e501603b TO |
604 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
605 | } | |
c3fc2621 | 606 | |
e501603b TO |
607 | /** |
608 | * Returns if this table needs to be logged | |
609 | * | |
c3fc2621 | 610 | * @return bool |
e501603b | 611 | */ |
c3fc2621 | 612 | public function getLog() { |
e501603b TO |
613 | return self::$_log; |
614 | } | |
c3fc2621 | 615 | |
e501603b TO |
616 | /** |
617 | * Returns the list of fields that can be imported | |
618 | * | |
619 | * @param bool $prefix | |
620 | * | |
621 | * @return array | |
622 | */ | |
c3fc2621 CW |
623 | public static function &import($prefix = FALSE) { |
624 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'uf_group', $prefix, []); | |
60808919 | 625 | return $r; |
e501603b | 626 | } |
c3fc2621 | 627 | |
e501603b TO |
628 | /** |
629 | * Returns the list of fields that can be exported | |
630 | * | |
631 | * @param bool $prefix | |
632 | * | |
633 | * @return array | |
634 | */ | |
c3fc2621 CW |
635 | public static function &export($prefix = FALSE) { |
636 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'uf_group', $prefix, []); | |
60808919 | 637 | return $r; |
e501603b | 638 | } |
c3fc2621 | 639 | |
e7a6b91a AS |
640 | /** |
641 | * Returns the list of indices | |
c3fc2621 CW |
642 | * |
643 | * @param bool $localize | |
644 | * | |
645 | * @return array | |
e7a6b91a AS |
646 | */ |
647 | public static function indices($localize = TRUE) { | |
c3fc2621 CW |
648 | $indices = [ |
649 | 'UI_name' => [ | |
e7a6b91a | 650 | 'name' => 'UI_name', |
c3fc2621 | 651 | 'field' => [ |
e7a6b91a | 652 | 0 => 'name', |
c3fc2621 CW |
653 | ], |
654 | 'localizable' => FALSE, | |
655 | 'unique' => TRUE, | |
e7a6b91a | 656 | 'sig' => 'civicrm_uf_group::1::name', |
c3fc2621 CW |
657 | ], |
658 | ]; | |
e7a6b91a AS |
659 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
660 | } | |
c3fc2621 | 661 | |
e501603b | 662 | } |