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