3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
12 use Civi\Token\TokenProcessor
;
15 * One place to store frequently used values in Select Elements. Note that
16 * some of the below elements will be dynamic, so we'll probably have a
17 * smart caching scheme on a per domain basis
20 * @copyright CiviCRM LLC https://civicrm.org/licensing
22 class CRM_Core_SelectValues
{
29 public static function boolean() {
37 * Preferred mail format.
41 public static function pmf() {
54 public static function privacy() {
56 'do_not_phone' => ts('Do not phone'),
57 'do_not_email' => ts('Do not email'),
58 'do_not_mail' => ts('Do not mail'),
59 'do_not_sms' => ts('Do not sms'),
60 'do_not_trade' => ts('Do not trade'),
61 'is_opt_out' => ts('No bulk emails (User Opt Out)'),
66 * Various pre defined contact super types.
70 public static function contactType() {
71 return CRM_Contact_BAO_ContactType
::basicTypePairs();
75 * Various pre defined unit list.
77 * @param string $unitType
80 public static function unitList($unitType = NULL) {
83 'month' => ts('month'),
86 if ($unitType === 'duration') {
87 $unitList['lifetime'] = ts('lifetime');
93 * Membership type unit.
97 public static function membershipTypeUnitList() {
98 return self
::unitList('duration');
102 * Various pre defined period types.
106 public static function periodType() {
108 'rolling' => ts('Rolling'),
109 'fixed' => ts('Fixed'),
114 * Various pre defined email selection methods.
118 public static function emailSelectMethods() {
120 'automatic' => ts('Automatic'),
121 'location-only' => ts('Only send to email addresses assigned to the specified location'),
122 'location-prefer' => ts('Prefer email addresses assigned to the specified location'),
123 'location-exclude' => ts('Exclude email addresses assigned to the specified location'),
128 * Various pre defined member visibility options.
132 public static function memberVisibility() {
134 'Public' => ts('Public'),
135 'Admin' => ts('Admin'),
140 * Member auto-renew options
144 public static function memberAutoRenew() {
146 ts('No auto-renew option'),
147 ts('Give option, but not required'),
148 ts('Auto-renew required'),
153 * Various pre defined event dates.
157 public static function eventDate() {
159 'start_date' => ts('start date'),
160 'end_date' => ts('end date'),
161 'join_date' => ts('member since'),
166 * Custom form field types.
170 public static function customHtmlType() {
174 'name' => 'Single-line input field (text or numeric)',
175 'label' => ts('Single-line input field (text or numeric)'),
179 'name' => 'Multi-line text box (textarea)',
180 'label' => ts('Multi-line text box (textarea)'),
184 'name' => 'Drop-down (select list)',
185 'label' => ts('Drop-down (select list)'),
189 'name' => 'Radio buttons',
190 'label' => ts('Radio buttons'),
194 'name' => 'Checkbox(es)',
195 'label' => ts('Checkbox(es)'),
198 'id' => 'Select Date',
199 'name' => 'Select Date',
200 'label' => ts('Select Date'),
205 'label' => ts('File'),
208 'id' => 'RichTextEditor',
209 'name' => 'Rich Text Editor',
210 'label' => ts('Rich Text Editor'),
213 'id' => 'Autocomplete-Select',
214 'name' => 'Autocomplete-Select',
215 'label' => ts('Autocomplete-Select'),
220 'label' => ts('Link'),
226 * Various pre defined extensions for dynamic properties and groups.
231 public static function customGroupExtends() {
232 $customGroupExtends = [
233 'Activity' => ts('Activities'),
234 'Relationship' => ts('Relationships'),
235 'Contribution' => ts('Contributions'),
236 'ContributionRecur' => ts('Recurring Contributions'),
237 'Group' => ts('Groups'),
238 'Membership' => ts('Memberships'),
239 'Event' => ts('Events'),
240 'Participant' => ts('Participants'),
241 'ParticipantRole' => ts('Participants (Role)'),
242 'ParticipantEventName' => ts('Participants (Event Name)'),
243 'ParticipantEventType' => ts('Participants (Event Type)'),
244 'Pledge' => ts('Pledges'),
245 'Grant' => ts('Grants'),
246 'Address' => ts('Addresses'),
247 'Campaign' => ts('Campaigns'),
249 $contactTypes = ['Contact' => ts('Contacts')] + self
::contactType();
250 $extendObjs = CRM_Core_OptionGroup
::values('cg_extend_objects');
251 $customGroupExtends = array_merge($contactTypes, $customGroupExtends, $extendObjs);
252 return $customGroupExtends;
256 * Styles for displaying the custom data group.
260 public static function customGroupStyle() {
263 'Inline' => ts('Inline'),
264 'Tab with table' => ts('Tab with table'),
269 * For displaying the uf group types.
273 public static function ufGroupTypes() {
275 'Profile' => ts('Standalone Form or Directory'),
276 'Search Profile' => ts('Search Views'),
279 if (CRM_Core_Config
::singleton()->userSystem
->supports_form_extensions
) {
280 $ufGroupType +
= CRM_Core_Config
::singleton()->userSystem
->getUfGroupTypes();
286 * The status of a contact within a group.
290 public static function groupContactStatus() {
292 'Added' => ts('Added'),
293 'Removed' => ts('Removed'),
294 'Pending' => ts('Pending'),
299 * List of Group Types.
303 public static function groupType() {
305 'query' => ts('Dynamic'),
306 'static' => ts('Static'),
311 * Compose the parameters for a date select object.
313 * @param string|null $type
315 * @param string|null $format
316 * date format (QF format)
317 * @param null $minOffset
318 * @param null $maxOffset
319 * @param string $context
323 * @throws CRM_Core_Exception
325 public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL, $context = 'display') {
326 // These options are deprecated. Definitely not used in datepicker. Possibly not even in jcalendar+addDateTime.
328 'addEmptyOption' => TRUE,
329 'emptyOptionText' => ts('- select -'),
330 'emptyOptionValue' => '',
334 $date['format'] = $format;
338 $dao = new CRM_Core_DAO_PreferencesDate();
340 if (!$dao->find(TRUE)) {
341 throw new CRM_Core_Exception('Date preferences not configured.');
344 $maxOffset = $dao->end
;
347 $minOffset = $dao->start
;
350 $date['format'] = $dao->date_format
;
351 $date['time'] = (bool) $dao->time_format
;
354 if (empty($date['format'])) {
355 if ($context === 'Input') {
356 $date['format'] = Civi
::settings()->get('dateInputFormat');
359 $date['format'] = 'M d';
364 $date['smarty_view_format'] = CRM_Utils_Date
::getDateFieldViewFormat($date['format']);
365 if (!isset($date['time'])) {
366 $date['time'] = FALSE;
370 $date['minYear'] = $year - (int) $minOffset;
371 $date['maxYear'] = $year +
(int) $maxOffset;
376 * Values for UF form visibility options.
380 public static function ufVisibility() {
382 'User and User Admin Only' => ts('User and User Admin Only'),
383 'Public Pages' => ts('Expose Publicly'),
384 'Public Pages and Listings' => ts('Expose Publicly and for Listings'),
389 * Values for group form visibility options.
393 public static function groupVisibility() {
395 'User and User Admin Only' => ts('User and User Admin Only'),
396 'Public Pages' => ts('Public Pages'),
401 * Different type of Mailing Components.
405 public static function mailingComponents() {
407 'Header' => ts('Header'),
408 'Footer' => ts('Footer'),
409 'Reply' => ts('Reply Auto-responder'),
410 'OptOut' => ts('Opt-out Message'),
411 'Subscribe' => ts('Subscription Confirmation Request'),
412 'Welcome' => ts('Welcome Message'),
413 'Unsubscribe' => ts('Unsubscribe Message'),
414 'Resubscribe' => ts('Resubscribe Message'),
423 public function getHours() {
425 for ($i = 0; $i <= 6; $i++
) {
436 public function getMinutes() {
438 for ($i = 0; $i < 60; $i = $i +
15) {
445 * Get the Map Provider.
448 * array of map providers
450 public static function mapProvider() {
453 $map = ['' => ts('- select -')] + CRM_Utils_System
::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
459 * Get the Geocoding Providers from available plugins.
462 * array of geocoder providers
464 public static function geoProvider() {
467 $geo = ['' => ts('- select -')] + CRM_Utils_System
::getPluginList('CRM/Utils/Geocode');
473 * Get options for displaying tax.
477 * @throws \CRM_Core_Exception
479 public static function taxDisplayOptions() {
481 'Do_not_show' => ts('Do not show breakdown, only show total - i.e %1', [
482 1 => CRM_Utils_Money
::format(120),
484 'Inclusive' => ts('Show [tax term] inclusive price - i.e. %1', [
485 1 => ts('%1 (includes [tax term] of %2)', [1 => CRM_Utils_Money
::format(120), 2 => CRM_Utils_Money
::format(20)]),
487 'Exclusive' => ts('Show [tax term] exclusive price - i.e. %1', [
488 1 => ts('%1 + %2 [tax term]', [1 => CRM_Utils_Money
::format(120), 2 => CRM_Utils_Money
::format(20)]),
494 * Get the Address Standardization Providers from available plugins.
497 * array of address standardization providers
499 public static function addressProvider() {
502 $addr = array_merge(['' => ts('- select -')], CRM_Utils_System
::getPluginList('CRM/Utils/Address', '.php', ['BatchUpdate']));
508 * Different type of Mailing Tokens.
512 public static function mailingTokens() {
514 '{action.unsubscribe}' => ts('Unsubscribe via email'),
515 '{action.unsubscribeUrl}' => ts('Unsubscribe via web page'),
516 '{action.resubscribe}' => ts('Resubscribe via email'),
517 '{action.resubscribeUrl}' => ts('Resubscribe via web page'),
518 '{action.optOut}' => ts('Opt out via email'),
519 '{action.optOutUrl}' => ts('Opt out via web page'),
520 '{action.forward}' => ts('Forward this email (link)'),
521 '{action.reply}' => ts('Reply to this email (link)'),
522 '{action.subscribeUrl}' => ts('Subscribe via web page'),
523 '{mailing.key}' => ts('Mailing key'),
524 '{mailing.name}' => ts('Mailing name'),
525 '{mailing.group}' => ts('Mailing group'),
526 '{mailing.viewUrl}' => ts('Mailing permalink'),
527 ] + self
::domainTokens();
537 public static function domainTokens() {
538 $tokenProcessor = new TokenProcessor(Civi
::dispatcher(), []);
539 return $tokenProcessor->listTokens();
543 * Different type of Activity Tokens.
547 public static function activityTokens() {
549 '{activity.activity_id}' => ts('Activity ID'),
550 '{activity.subject}' => ts('Activity Subject'),
551 '{activity.details}' => ts('Activity Details'),
552 '{activity.activity_date_time}' => ts('Activity Date Time'),
557 * Different type of Membership Tokens.
561 public static function membershipTokens(): array {
563 '{membership.id}' => ts('Membership ID'),
564 '{membership.status_id:label}' => ts('Status'),
565 '{membership.membership_type_id:label}' => ts('Membership Type'),
566 '{membership.start_date}' => ts('Membership Start Date'),
567 '{membership.join_date}' => ts('Member Since'),
568 '{membership.end_date}' => ts('Membership Expiration Date'),
569 '{membership.fee}' => ts('Membership Fee'),
574 * Different type of Event Tokens.
580 public static function eventTokens(): array {
581 $tokenProcessor = new TokenProcessor(Civi
::dispatcher(), ['schema' => ['eventId']]);
582 $allTokens = $tokenProcessor->listTokens();
583 foreach (array_keys($allTokens) as $token) {
584 if (strpos($token, '{domain.') === 0) {
585 unset($allTokens[$token]);
592 * Different type of Contribution Tokens.
598 public static function contributionTokens(): array {
599 $tokenProcessor = new TokenProcessor(Civi
::dispatcher(), ['schema' => ['contributionId']]);
600 $allTokens = $tokenProcessor->listTokens();
601 foreach (array_keys($allTokens) as $token) {
602 if (strpos($token, '{domain.') === 0) {
603 unset($allTokens[$token]);
610 * Different type of Contact Tokens.
616 public static function contactTokens(): array {
617 $tokenProcessor = new TokenProcessor(Civi
::dispatcher(), ['schema' => ['contactId']]);
618 $allTokens = $tokenProcessor->listTokens();
619 foreach (array_keys($allTokens) as $token) {
620 if (strpos($token, '{domain.') === 0) {
621 unset($allTokens[$token]);
628 * Different type of Participant Tokens.
634 public static function participantTokens(): array {
635 $tokenProcessor = new TokenProcessor(Civi
::dispatcher(), ['schema' => ['participantId']]);
636 $allTokens = $tokenProcessor->listTokens();
637 foreach (array_keys($allTokens) as $token) {
638 if (strpos($token, '{domain.') === 0 ||
strpos($token, '{event.') === 0) {
639 unset($allTokens[$token]);
646 * @param int $caseTypeId
649 public static function caseTokens($caseTypeId = NULL) {
651 '{case.id}' => ts('Case ID'),
652 '{case.case_type_id:label}' => ts('Case Type'),
653 '{case.subject}' => ts('Case Subject'),
654 '{case.start_date}' => ts('Case Start Date'),
655 '{case.end_date}' => ts('Case End Date'),
656 '{case.details}' => ts('Details'),
657 '{case.status_id:label}' => ts('Case Status'),
658 '{case.is_deleted:label}' => ts('Case is in the Trash'),
659 '{case.created_date}' => ts('Created Date'),
660 '{case.modified_date}' => ts('Modified Date'),
663 $customFields = CRM_Core_BAO_CustomField
::getFields('Case', FALSE, FALSE, $caseTypeId);
664 foreach ($customFields as $id => $field) {
665 $tokens["{case.custom_$id}"] = "{$field['label']} :: {$field['groupTitle']}";
671 * CiviCRM supported date input formats.
675 public static function getDatePluginInputFormats() {
677 'mm/dd/yy' => ts('mm/dd/yy (12/31/2009)'),
678 'dd/mm/yy' => ts('dd/mm/yy (31/12/2009)'),
679 'yy-mm-dd' => ts('yy-mm-dd (2009-12-31)'),
680 'dd-mm-yy' => ts('dd-mm-yy (31-12-2009)'),
681 'dd.mm.yy' => ts('dd.mm.yy (31.12.2009)'),
682 'M d, yy' => ts('M d, yy (Dec 31, 2009)'),
683 'd M yy' => ts('d M yy (31 Dec 2009)'),
684 'MM d, yy' => ts('MM d, yy (December 31, 2009)'),
685 'd MM yy' => ts('d MM yy (31 December 2009)'),
686 'DD, d MM yy' => ts('DD, d MM yy (Thursday, 31 December 2009)'),
687 'mm/dd' => ts('mm/dd (12/31)'),
688 'dd-mm' => ts('dd-mm (31-12)'),
689 'yy-mm' => ts('yy-mm (2009-12)'),
690 'M yy' => ts('M yy (Dec 2009)'),
691 'yy' => ts('yy (2009)'),
700 public static function getTimeFormats() {
702 '1' => ts('12 Hours'),
703 '2' => ts('24 Hours'),
708 * Get numeric options.
715 public static function getNumericOptions($start = 0, $end = 10) {
716 $numericOptions = [];
717 for ($i = $start; $i <= $end; $i++
) {
718 $numericOptions[$i] = $i;
720 return $numericOptions;
728 public static function getBarcodeTypes() {
730 'barcode' => ts('Linear (1D)'),
731 'qrcode' => ts('QR code'),
740 public static function getDedupeRuleTypes() {
742 'Unsupervised' => ts('Unsupervised'),
743 'Supervised' => ts('Supervised'),
744 'General' => ts('General'),
749 * Campaign group types.
753 public static function getCampaignGroupTypes() {
755 'Include' => ts('Include'),
756 'Exclude' => ts('Exclude'),
761 * Subscription history method.
765 public static function getSubscriptionHistoryMethods() {
767 'Admin' => ts('Admin'),
768 'Email' => ts('Email'),
779 public static function getPremiumUnits() {
782 'week' => ts('Week'),
783 'month' => ts('Month'),
784 'year' => ts('Year'),
793 public static function getExtensionTypes() {
795 'payment' => ts('Payment'),
796 'search' => ts('Search'),
797 'report' => ts('Report'),
798 'module' => ts('Module'),
808 public static function getJobFrequency() {
811 'Yearly' => ts('Yearly'),
812 'Quarter' => ts('Quarterly'),
813 'Monthly' => ts('Monthly'),
814 'Weekly' => ts('Weekly'),
816 'Daily' => ts('Daily'),
817 'Hourly' => ts('Hourly'),
818 'Always' => ts('Every time cron job is run'),
823 * Search builder operators.
827 public static function getSearchBuilderOperators() {
836 'NOT IN' => ts('Not In'),
837 'LIKE' => ts('Like'),
838 'NOT LIKE' => ts('Not Like'),
839 'RLIKE' => ts('Regex'),
840 'IS EMPTY' => ts('Is Empty'),
841 'IS NOT EMPTY' => ts('Not Empty'),
842 'IS NULL' => ts('Is Null'),
843 'IS NOT NULL' => ts('Not Null'),
848 * Profile group types.
852 public static function getProfileGroupType() {
853 $profileGroupType = [
854 'Activity' => ts('Activities'),
855 'Contribution' => ts('Contributions'),
856 'Membership' => ts('Memberships'),
857 'Participant' => ts('Participants'),
859 $contactTypes = self
::contactType();
860 $contactTypes = !empty($contactTypes) ?
['Contact' => 'Contacts'] +
$contactTypes : [];
861 $profileGroupType = array_merge($contactTypes, $profileGroupType);
863 return $profileGroupType;
867 * Word replacement match type.
871 public static function getWordReplacementMatchType() {
873 'exactMatch' => ts('Exact Match'),
874 'wildcardMatch' => ts('Wildcard Match'),
879 * Mailing group types.
883 public static function getMailingGroupTypes() {
885 'Include' => ts('Include'),
886 'Exclude' => ts('Exclude'),
887 'Base' => ts('Base'),
892 * Mailing Job Status.
896 public static function getMailingJobStatus() {
898 'Scheduled' => ts('Scheduled'),
899 'Running' => ts('Running'),
900 'Complete' => ts('Complete'),
901 'Paused' => ts('Paused'),
902 'Canceled' => ts('Canceled'),
909 public static function billingMode() {
912 'id' => CRM_Core_Payment
::BILLING_MODE_FORM
,
917 'id' => CRM_Core_Payment
::BILLING_MODE_BUTTON
,
922 'id' => CRM_Core_Payment
::BILLING_MODE_NOTIFY
,
932 public static function contributeMode() {
935 'id' => CRM_Core_Payment
::BILLING_MODE_FORM
,
940 'id' => CRM_Core_Payment
::BILLING_MODE_BUTTON
,
941 'name' => 'directIPN',
942 'label' => 'directIPN',
945 'id' => CRM_Core_Payment
::BILLING_MODE_NOTIFY
,
953 * Frequency unit for schedule reminders.
959 public static function getRecurringFrequencyUnits($count = 1) {
960 // @todo this used to refer to the 'recur_frequency_unit' option_values which
961 // is for recurring payments and probably not good to re-use for recurring entities.
962 // If something other than a hard-coded list is desired, add a new option_group.
964 'minute' => ts('minute', ['plural' => 'minutes', 'count' => $count]),
965 'hour' => ts('hour', ['plural' => 'hours', 'count' => $count]),
966 'day' => ts('day', ['plural' => 'days', 'count' => $count]),
967 'week' => ts('week', ['plural' => 'weeks', 'count' => $count]),
968 'month' => ts('month', ['plural' => 'months', 'count' => $count]),
969 'year' => ts('year', ['plural' => 'years', 'count' => $count]),
974 * Relative Date Terms.
978 public static function getRelativeDateTerms() {
980 'previous' => ts('Previous'),
981 'previous_2' => ts('Previous 2'),
982 'previous_before' => ts('Prior to Previous'),
983 'before_previous' => ts('All Prior to Previous'),
984 'earlier' => ts('To End of Previous'),
985 'greater_previous' => ts('From End of Previous'),
986 'greater' => ts('From Start Of Current'),
987 'current' => ts('Current'),
988 'ending_3' => ts('Last 3'),
989 'ending_2' => ts('Last 2'),
990 'ending' => ts('Last'),
991 'this' => ts('This'),
992 'starting' => ts('Upcoming'),
993 'less' => ts('To End of'),
994 'next' => ts('Next'),
999 * Relative Date Units.
1003 public static function getRelativeDateUnits() {
1005 'year' => ts('Years'),
1006 'fiscal_year' => ts('Fiscal Years'),
1007 'quarter' => ts('Quarters'),
1008 'month' => ts('Months'),
1009 'week' => ts('Weeks'),
1010 'day' => ts('Days'),
1015 * Exportable document formats.
1019 public static function documentFormat() {
1021 'pdf' => ts('Portable Document Format (.pdf)'),
1022 'docx' => ts('MS Word (.docx)'),
1023 'odt' => ts('Open Office (.odt)'),
1024 'html' => ts('Webpage (.html)'),
1029 * Application type of document.
1033 public static function documentApplicationType() {
1035 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
1036 'odt' => 'application/vnd.oasis.opendocument.text',
1041 * Activity Text options.
1045 public static function activityTextOptions() {
1047 2 => ts('Details Only'),
1048 3 => ts('Subject Only'),
1054 * Relationship permissions
1058 public static function getPermissionedRelationshipOptions() {
1060 CRM_Contact_BAO_Relationship
::NONE
=> ts('None'),
1061 CRM_Contact_BAO_Relationship
::VIEW
=> ts('View only'),
1062 CRM_Contact_BAO_Relationship
::EDIT
=> ts('View and update'),
1067 * Get option values for dashboard entries (used for 'how many events to display on dashboard').
1070 * Dashboard entries options - in practice [-1 => 'Show All', 10 => 10, 20 => 20, ... 100 => 100].
1072 public static function getDashboardEntriesCount() {
1074 $optionValues[-1] = ts('show all');
1075 for ($i = 10; $i <= 100; $i +
= 10) {
1076 $optionValues[$i] = $i;
1078 return $optionValues;
1082 * Dropdown options for quicksearch in the menu
1085 * @throws \CiviCRM_API3_Exception
1087 public static function quicksearchOptions() {
1088 $includeEmail = civicrm_api3('setting', 'getvalue', ['name' => 'includeEmailInName', 'group' => 'Search Preferences']);
1090 'sort_name' => $includeEmail ?
ts('Name/Email') : ts('Name'),
1091 'contact_id' => ts('Contact ID'),
1092 'external_identifier' => ts('External ID'),
1093 'first_name' => ts('First Name'),
1094 'last_name' => ts('Last Name'),
1095 'email' => ts('Email'),
1096 'phone_numeric' => ts('Phone'),
1097 'street_address' => ts('Street Address'),
1098 'city' => ts('City'),
1099 'postal_code' => ts('Postal Code'),
1100 'job_title' => ts('Job Title'),
1102 $custom = civicrm_api3('CustomField', 'get', [
1103 'return' => ['name', 'label', 'custom_group_id.title'],
1104 'custom_group_id.extends' => ['IN' => array_merge(['Contact'], CRM_Contact_BAO_ContactType
::basicTypes())],
1105 'data_type' => ['NOT IN' => ['ContactReference', 'Date', 'File']],
1106 'custom_group_id.is_active' => 1,
1108 'is_searchable' => 1,
1109 'options' => ['sort' => ['custom_group_id.weight', 'weight'], 'limit' => 0],
1111 foreach ($custom['values'] as $field) {
1112 $options['custom_' . $field['name']] = $field['custom_group_id.title'] . ': ' . $field['label'];
1118 * Get components (translated for display.
1122 * @throws \Exception
1124 public static function getComponentSelectValues() {
1126 $components = CRM_Core_Component
::getComponents();
1127 foreach ($components as $name => $object) {
1128 $ret[$name] = $object->info
['translatedName'];
1137 public static function fieldSerialization() {
1139 CRM_Core_DAO
::SERIALIZE_NONE
=> 'none',
1140 CRM_Core_DAO
::SERIALIZE_SEPARATOR_BOOKEND
=> 'separator_bookend',
1141 CRM_Core_DAO
::SERIALIZE_SEPARATOR_TRIMMED
=> 'separator_trimmed',
1142 CRM_Core_DAO
::SERIALIZE_JSON
=> 'json',
1143 CRM_Core_DAO
::SERIALIZE_PHP
=> 'php',
1144 CRM_Core_DAO
::SERIALIZE_COMMA
=> 'comma',
1151 public static function navigationMenuSeparator() {
1154 ts('After menu element'),
1155 ts('Before menu element'),
1162 public static function relationshipOrientation() {
1164 'a_b' => ts('A to B'),
1165 'b_a' => ts('B to A'),
1172 public static function andOr() {
1180 * Columns from the option_value table which may or may not be used by each option_group.
1182 * Note: Value is not listed here as it is not optional.
1186 public static function optionValueFields() {
1190 'description' => 'description',