3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.4 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * One place to store frequently used values in Select Elements. Note that
30 * some of the below elements will be dynamic, so we'll probably have a
31 * smart caching scheme on a per domain basis
34 * @copyright CiviCRM LLC (c) 2004-2013
38 class CRM_Core_SelectValues
{
40 /**CRM/Core/SelectValues.php
41 * different types of phones
44 static function &phoneType() {
45 static $phoneType = NULL;
48 '' => ts('- select -'),
49 'Phone' => ts('Phone'),
50 'Mobile' => ts('Mobile'),
52 'Pager' => ts('Pager'),
59 * preferred mail format
62 static function &pmf() {
78 static function &privacy() {
79 static $privacy = NULL;
82 'do_not_phone' => ts('Do not phone'),
83 'do_not_email' => ts('Do not email'),
84 'do_not_mail' => ts('Do not mail'),
85 'do_not_sms' => ts('Do not sms'),
86 'do_not_trade' => ts('Do not trade'),
87 'is_opt_out' => ts('No bulk emails (User Opt Out)'),
94 * various pre defined contact super types
97 static function &contactType() {
98 static $contactType = NULL;
100 $contactType = CRM_Contact_BAO_ContactType
::basicTypePairs();
106 * various pre defined unit list
109 static function &unitList($unitType = NULL) {
110 static $unitList = NULL;
113 '' => ts('- select -'),
115 'month' => ts('month'),
116 'year' => ts('year'),
118 if ($unitType == 'duration') {
120 'lifetime' => ts('lifetime'),
122 $unitList = array_merge($unitList, $unitAdd);
129 * membership type unit
132 static function membershipTypeUnitList( ) {
133 static $membershipTypeUnitList = NULL;
134 if (!$membershipTypeUnitList) {
135 $membershipTypeUnitList = self
::unitList('duration');
137 return $membershipTypeUnitList;
141 * various pre defined period types
144 static function &periodType() {
145 static $periodType = NULL;
148 '' => ts('- select -'),
149 'rolling' => ts('Rolling'),
150 'fixed' => ts('Fixed'),
157 * various pre defined member visibility options
160 static function &memberVisibility() {
161 static $visible = NULL;
164 'Public' => ts('Public'),
165 'Admin' => ts('Admin'),
172 * various pre defined event dates
175 static function &eventDate() {
176 static $eventDate = NULL;
179 '' => ts('- select -'),
180 'start_date' => ts('start date'),
181 'end_date' => ts('end date'),
182 'join_date' => ts('member since'),
189 * Extended property (custom field) data types
192 static function &customDataType() {
193 static $customDataType = NULL;
194 if (!$customDataType) {
195 $customDataType = array(
196 '' => ts('- select -'),
197 'String' => ts('Text'),
198 'Int' => ts('Integer'),
199 'Float' => ts('Decimal Number'),
200 'Money' => ts('Money'),
201 'Text' => ts('Memo'),
202 'Date' => ts('Date'),
203 'File' => ts('File'),
204 'Boolean' => ts('Yes/No'),
205 'Link' => ts('Link'),
206 'Auto-complete' => ts('Auto-complete'),
209 return $customDataType;
213 * Custom form field types
216 static function &customHtmlType() {
217 static $customHtmlType = NULL;
218 if (!$customHtmlType) {
219 $customHtmlType = array(
220 '' => ts('- select -'),
221 'Text' => ts('Single-line input field (text or numeric)'),
222 'TextArea' => ts('Multi-line text box (textarea)'),
223 'Select' => ts('Drop-down (select list)'),
224 'Radio' => ts('Radio buttons'),
225 'Checkbox' => ts('Checkbox(es)'),
226 'Select Date' => ts('Date selector'),
227 'File' => ts('File'),
228 'Select State / Province' => ts('State / Province selector'),
229 'Select Country' => ts('Country selector'),
230 'RichTextEditor' => ts('Rich Text Editor'),
231 'Auto-complete' => ts('Contact Reference'),
234 return $customHtmlType;
238 * various pre defined extensions for dynamic properties and groups
242 static function &customGroupExtends() {
243 static $customGroupExtends = NULL;
244 if (!$customGroupExtends) {
245 $customGroupExtends = array(
246 'Activity' => ts('Activities'),
247 'Relationship' => ts('Relationships'),
248 'Contribution' => ts('Contributions'),
249 'Group' => ts('Groups'),
250 'Membership' => ts('Memberships'),
251 'Event' => ts('Events'),
252 'Participant' => ts('Participants'),
253 'ParticipantRole' => ts('Participants (Role)'),
254 'ParticipantEventName' => ts('Participants (Event Name)'),
255 'ParticipantEventType' => ts('Participants (Event Type)'),
256 'Pledge' => ts('Pledges'),
257 'Grant' => ts('Grants'),
258 'Address' => ts('Addresses'),
259 'Campaign' => ts('Campaigns'),
261 $contactTypes = self
::contactType();
262 $contactTypes = !empty($contactTypes) ?
array('Contact' => 'Contacts') +
$contactTypes : array();
263 $extendObjs = CRM_Core_OptionGroup
::values('cg_extend_objects');
264 $customGroupExtends = array_merge($contactTypes, $customGroupExtends, $extendObjs);
266 return $customGroupExtends;
270 * styles for displaying the custom data group
274 static function &customGroupStyle() {
275 static $customGroupStyle = NULL;
276 if (!$customGroupStyle) {
277 $customGroupStyle = array(
279 'Inline' => ts('Inline'),
280 'Tab with table' => ts('Tab with table')
283 return $customGroupStyle;
287 * for displaying the uf group types
291 static function &ufGroupTypes() {
292 static $ufGroupType = NULL;
294 $ufGroupType = array(
295 'Profile' => ts('Standalone Form or Directory'),
296 'Search Profile' => ts('Search Views'),
298 $config = CRM_Core_Config
::singleton();
299 if ($config->userSystem
->supports_form_extensions
) {
300 $ufGroupType +
= array(
301 'User Registration' => ts('Drupal User Registration'),
302 'User Account' => ts('View/Edit Drupal User Account'),
310 * the status of a contact within a group
314 static function &groupContactStatus() {
315 static $groupContactStatus = NULL;
316 if (!$groupContactStatus) {
317 $groupContactStatus = array(
318 'Added' => ts('Added'),
319 'Removed' => ts('Removed'),
320 'Pending' => ts('Pending'),
323 return $groupContactStatus;
327 * list of Group Types
330 static function &groupType() {
331 static $groupType = NULL;
334 'query' => ts('Dynamic'),
335 'static' => ts('Static'),
342 * compose the parameters for a date select object
344 * @param $type the type of date
345 * @param $format date format ( QF format)
347 * @return array the date array
350 static function &date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
353 'addEmptyOption' => TRUE,
354 'emptyOptionText' => ts('- select -'),
355 'emptyOptionValue' => '',
359 $date['format'] = $format;
363 $dao = new CRM_Core_DAO_PreferencesDate();
365 if (!$dao->find(TRUE)) {
366 CRM_Core_Error
::fatal();
370 if ($type == 'creditCard') {
371 $minOffset = $dao->start
;
372 $maxOffset = $dao->end
;
373 $date['format'] = $dao->date_format
;
374 $date['addEmptyOption'] = TRUE;
375 $date['emptyOptionText'] = ts('- select -');
376 $date['emptyOptionValue'] = '';
379 if (empty($date['format'])) {
380 $date['format'] = 'M d';
385 $date['minYear'] = $year - $minOffset;
386 $date['maxYear'] = $year +
$maxOffset;
391 * values for UF form visibility options
395 static function ufVisibility($isGroup = FALSE) {
396 static $_visibility = NULL;
398 $_visibility = array(
399 'User and User Admin Only' => ts('User and User Admin Only'),
400 'Public Pages' => ts('Public Pages'),
401 'Public Pages and Listings' => ts('Public Pages and Listings'),
404 unset($_visibility['Public Pages and Listings']);
411 * values for group form visibility options
415 static function groupVisibility() {
416 static $_groupVisibility = NULL;
417 if (!$_groupVisibility) {
418 $_groupVisibility = self
::ufVisibility(true);
420 return $_groupVisibility;
424 * different type of Mailing Components
429 static function &mailingComponents() {
430 static $components = NULL;
433 $components = array('Header' => ts('Header'),
434 'Footer' => ts('Footer'),
435 'Reply' => ts('Reply Auto-responder'),
436 'OptOut' => ts('Opt-out Message'),
437 'Subscribe' => ts('Subscription Confirmation Request'),
438 'Welcome' => ts('Welcome Message'),
439 'Unsubscribe' => ts('Unsubscribe Message'),
440 'Resubscribe' => ts('Resubscribe Message'),
447 * Function to get hours
452 function getHours() {
453 for ($i = 0; $i <= 6; $i++
) {
460 * Function to get minutes
465 function getMinutes() {
466 for ($i = 0; $i < 60; $i = $i +
15) {
473 * Function to get the Map Provider
475 * @return array $map array of map providers
478 static function mapProvider() {
481 return CRM_Utils_System
::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
487 * Function to get the Geocoding Providers from available plugins
489 * @return array $geo array of geocoder providers
492 static function geoProvider() {
495 return CRM_Utils_System
::getPluginList('CRM/Utils/Geocode');
501 * Function to get the Address Standardization Providers from available
504 * @return array $addr array of address standardization providers
507 static function addressProvider() {
510 return CRM_Utils_System
::getPluginList('CRM/Utils/Address',
519 * different type of Mailing Tokens
524 static function &mailingTokens() {
525 static $tokens = NULL;
528 $tokens = array('{action.unsubscribe}' => ts('Unsubscribe via email'),
529 '{action.unsubscribeUrl}' => ts('Unsubscribe via web page'),
530 '{action.resubscribe}' => ts('Resubscribe via email'),
531 '{action.resubscribeUrl}' => ts('Resubscribe via web page'),
532 '{action.optOut}' => ts('Opt out via email'),
533 '{action.optOutUrl}' => ts('Opt out via web page'),
534 '{action.forward}' => ts('Forward this email (link)'),
535 '{action.reply}' => ts('Reply to this email (link)'),
536 '{action.subscribeUrl}' => ts('Subscribe via web page'),
537 '{domain.name}' => ts('Domain name'),
538 '{domain.address}' => ts('Domain (organization) address'),
539 '{domain.phone}' => ts('Domain (organization) phone'),
540 '{domain.email}' => ts('Domain (organization) email'),
541 '{mailing.name}' => ts('Mailing name'),
542 '{mailing.group}' => ts('Mailing group'),
543 '{mailing.viewUrl}' => ts('Mailing permalink'),
550 * different type of Activity Tokens
555 static function &activityTokens() {
556 static $tokens = NULL;
560 '{activity.activity_id}' => ts('Activity ID'),
561 '{activity.subject}' => ts('Activity Subject'),
562 '{activity.details}' => ts('Activity Details'),
563 '{activity.activity_date_time}' => ts('Activity Date Time'),
570 * different type of Membership Tokens
575 static function &membershipTokens() {
576 static $tokens = NULL;
580 '{membership.id}' => ts('Membership ID'),
581 '{membership.status}' => ts('Membership Status'),
582 '{membership.type}' => ts('Membership Type'),
583 '{membership.start_date}' => ts('Membership Start Date'),
584 '{membership.join_date}' => ts('Membership Join Date'),
585 '{membership.end_date}' => ts('Membership End Date'),
586 '{membership.fee}' => ts('Membership Fee'),
593 * different type of Event Tokens
598 static function &eventTokens() {
599 static $tokens = NULL;
603 '{event.event_id}' => ts('Event ID'),
604 '{event.title}' => ts('Event Title'),
605 '{event.start_date}' => ts('Event Start Date'),
606 '{event.end_date}' => ts('Event End Date'),
607 '{event.event_type}' => ts('Event Type'),
608 '{event.summary}' => ts('Event Summary'),
609 '{event.description}' => ts('Event Description'),
610 '{event.contact_email}' => ts('Event Contact Email'),
611 '{event.contact_phone}' => ts('Event Contact Phone'),
612 '{event.location}' => ts('Event Location'),
613 '{event.description}' => ts('Event Description'),
614 '{event.location}' => ts('Event Location'),
615 '{event.fee_amount}' => ts('Event Fees'),
616 '{event.info_url}' => ts('Event Info URL'),
617 '{event.registration_url}' => ts('Event Registration URL'),
618 '{event.balance}' => ts('Event Balance')
625 * different type of Event Tokens
630 static function &contributionTokens() {
631 static $tokens = NULL;
635 '{contribution.contribution_id}' => ts('Contribution ID'),
636 '{contribution.total_amount}' => ts('Total Amount'),
637 '{contribution.fee_amount}' => ts('Fee Amount'),
638 '{contribution.net_amount}' => ts('Net Amount'),
639 '{contribution.non_deductible_amount}' => ts('Non Deductible Amount'),
640 '{contribution.receive_date}' => ts('Contribution Receive Date'),
641 '{contribution.payment_instrument}' => ts('Payment Instrument'),
642 '{contribution.trxn_id}' => ts('Transaction ID'),
643 '{contribution.invoice_id}' => ts('Invoice ID'),
644 '{contribution.currency}' => ts('Currency'),
645 '{contribution.cancel_date}' => ts('Contribution Cancel Date'),
646 '{contribution.cancel_reason}' => ts('Contribution Cancel Reason'),
647 '{contribution.receipt_date}' => ts('Receipt Date'),
648 '{contribution.thankyou_date}' => ts('Thank You Date'),
649 '{contribution.contribution_source}' => ts('Contribution Source'),
650 '{contribution.amount_level}' => ts('Amount Level'),
651 //'{contribution.contribution_recur_id}' => ts('Contribution Recurring ID'),
652 //'{contribution.honor_contact_id}' => ts('Honor Contact ID'),
653 '{contribution.contribution_status_id}' => ts('Contribution Status'),
654 //'{contribution.honor_type_id}' => ts('Honor Type ID'),
655 //'{contribution.address_id}' => ts('Address ID'),
656 '{contribution.check_number}' => ts('Check Number'),
657 '{contribution.campaign}' => ts('Contribution Campaign'),
664 * different type of Contact Tokens
669 static function &contactTokens() {
670 static $tokens = NULL;
672 $additionalFields = array('checksum' => array('title' => ts('Checksum')),
673 'contact_id' => array('title' => ts('Internal Contact ID')),
675 $exportFields = array_merge(CRM_Contact_BAO_Contact
::exportableFields(), $additionalFields);
677 $values = array_merge(array_keys($exportFields));
680 //FIXME:skipping some tokens for time being.
682 'is_bulkmail', 'group', 'tag', 'contact_sub_type', 'note',
683 'is_deceased', 'deceased_date', 'legal_identifier', 'contact_sub_type', 'user_unique_id',
686 $customFields = CRM_Core_BAO_CustomField
::getFields('Individual');
687 $customFieldsAddress = CRM_Core_BAO_CustomField
::getFields('Address');
688 $customFields = $customFields +
$customFieldsAddress;
689 $legacyTokenNames = array_flip(CRM_Utils_Token
::legacyContactTokens());
691 foreach ($values as $val) {
692 if (in_array($val, $skipTokens)) {
695 //keys for $tokens should be constant. $token Values are changed for Custom Fields. CRM-3734
696 if ($customFieldId = CRM_Core_BAO_CustomField
::getKeyID($val)) {
697 $tokens["{contact.$val}"] = !empty($customFields[$customFieldId]) ?
$customFields[$customFieldId]['label'] . " :: " . $customFields[$customFieldId]['groupTitle'] : '';
700 // Support legacy token names
701 $tokenName = CRM_Utils_Array
::value($val, $legacyTokenNames, $val);
702 $tokens["{contact.$tokenName}"] = $exportFields[$val]['title'];
706 // might as well get all the hook tokens to
707 $hookTokens = array();
708 CRM_Utils_Hook
::tokens($hookTokens);
709 foreach ($hookTokens as $category => $tokenValues) {
710 foreach ($tokenValues as $key => $value) {
711 if (is_numeric($key)) {
714 if (!preg_match('/^\{[^\}]+\}$/', $key)) {
715 $key = '{' . $key . '}';
717 if (preg_match('/^\{([^\}]+)\}$/', $value, $matches)) {
718 $value = $matches[1];
720 $tokens[$key] = $value;
729 * different type of Participant Tokens
734 static function &participantTokens() {
735 static $tokens = NULL;
737 $exportFields = CRM_Event_BAO_Participant
::exportableFields();
739 $values = array_merge(array_keys($exportFields));
742 // skipping some tokens for time being.
744 'event_id', 'participant_is_pay_later', 'participant_is_test', 'participant_contact_id',
745 'participant_fee_currency', 'participant_campaign_id', 'participant_status', 'participant_discount_name',
748 $customFields = CRM_Core_BAO_CustomField
::getFields('Participant');
750 foreach ($values as $key => $val) {
751 if (in_array($val, $skipTokens)) {
754 //keys for $tokens should be constant. $token Values are changed for Custom Fields. CRM-3734
755 if ($customFieldId = CRM_Core_BAO_CustomField
::getKeyID($val)) {
756 $tokens["{participant.$val}"] = !empty($customFields[$customFieldId]) ?
$customFields[$customFieldId]['label'] . " :: " . $customFields[$customFieldId]['groupTitle'] : '';
759 $tokens["{participant.$val}"] = $exportFields[$val]['title'];
767 * get qf mappig for all date parts.
770 static function &qfDatePartsMapping() {
771 static $qfDatePartsMapping = NULL;
772 if (!$qfDatePartsMapping) {
773 $qfDatePartsMapping = array(
792 return $qfDatePartsMapping;
796 * CiviCRM supported date input formats
798 static function getDatePluginInputFormats() {
799 $dateInputFormats = array(
800 "mm/dd/yy" => ts('mm/dd/yyyy (12/31/2009)'),
801 "dd/mm/yy" => ts('dd/mm/yyyy (31/12/2009)'),
802 "yy-mm-dd" => ts('yyyy-mm-dd (2009-12-31)'),
803 "dd-mm-yy" => ts('dd-mm-yyyy (31-12-2009)'),
804 'dd.mm.yy' => ts('dd.mm.yyyy (31.12.2009)'),
805 "M d, yy" => ts('M d, yyyy (Dec 31, 2009)'),
806 'd M yy' => ts('d M yyyy (31 Dec 2009)'),
807 "MM d, yy" => ts('MM d, yyyy (December 31, 2009)'),
808 'd MM yy' => ts('d MM yyyy (31 December 2009)'),
809 "DD, d MM yy" => ts('DD, d MM yyyy (Thursday, 31 December 2009)'),
810 "mm/dd" => ts('mm/dd (12/31)'),
811 "dd-mm" => ts('dd-mm (31-12)'),
812 "yy-mm" => ts('yyyy-mm (2009-12)'),
813 'M yy' => ts('M yyyy (Dec 2009)'),
814 "yy" => ts('yyyy (2009)'),
818 Year greater than 2000 get wrong result for following format
819 echo date( 'Y-m-d', strtotime( '7 Nov, 2001') );
820 echo date( 'Y-m-d', strtotime( '7 November, 2001') );
822 expected :: 2001-11-07
825 echo date( 'Y-m-d', strtotime( 'Nov 7, 2001') );
826 echo date( 'Y-m-d', strtotime( 'November 7, 2001') );
831 return $dateInputFormats;
835 * Map date plugin and actual format that is used by PHP
837 static function datePluginToPHPFormats() {
838 $dateInputFormats = array(
839 "mm/dd/yy" => 'm/d/Y',
840 "dd/mm/yy" => 'd/m/Y',
841 "yy-mm-dd" => 'Y-m-d',
842 "dd-mm-yy" => 'd-m-Y',
843 "dd.mm.yy" => 'd.m.Y',
844 "M d, yy" => 'M j, Y',
846 "MM d, yy" => 'F j, Y',
847 "d MM yy" => 'j F Y',
848 "DD, d MM yy" => 'l, j F Y',
855 return $dateInputFormats;
861 static function getTimeFormats() {
862 $timeFormats = array('1' => ts('12 Hours'),
863 '2' => ts('24 Hours'),
869 * Function to get numeric options
874 public static function getNumericOptions($start = 0, $end = 10) {
875 for ($i = $start; $i <= $end; $i++
) {
876 $numericOptions[$i] = $i;
878 return $numericOptions;
885 static function getBarcodeTypes() {
886 static $barcodeTypes = NULL;
887 if (!$barcodeTypes) {
888 $barcodeTypes = array(
889 'barcode' => ts('Linear (1D)'),
890 'qrcode' => ts('QR code'),
893 return $barcodeTypes;
899 static function getDedupeRuleTypes() {
900 static $dedupeRuleTypes = NULL;
901 if (!$dedupeRuleTypes) {
902 $dedupeRuleTypes = array(
903 'Unsupervised' => ts('Unsupervised'),
904 'Supervised' => ts('Supervised'),
905 'General' => ts('General'),
908 return $dedupeRuleTypes;
912 * campaign group types
914 static function getCampaignGroupTypes() {
915 static $campaignGroupTypes = NULL;
916 if (!$campaignGroupTypes) {
917 $campaignGroupTypes = array(
918 'Include' => ts('Include'),
919 'Exclude' => ts('Exclude'),
922 return $campaignGroupTypes;
926 * subscription history method
928 static function getSubscriptionHistoryMethods() {
929 static $subscriptionHistoryMethods = NULL;
930 if (!$subscriptionHistoryMethods) {
931 $subscriptionHistoryMethods = array(
932 'Admin' => ts('Admin'),
933 'Email' => ts('Email'),
939 return $subscriptionHistoryMethods;
945 static function getPremiumUnits() {
946 static $premiumUnits = NULL;
947 if (!$premiumUnits) {
948 $premiumUnits = array(
950 'week' => ts('Week'),
951 'month' => ts('Month'),
952 'year' => ts('Year'),
956 return $premiumUnits;
962 static function getExtensionTypes() {
963 static $extensionTypes = NULL;
964 if (!$extensionTypes) {
965 $extensionTypes = array(
966 'payment' => ts('Payment'),
967 'search' => ts('Search'),
968 'report' => ts('Report'),
969 'module' => ts('Module'),
974 return $extensionTypes;
980 static function getJobFrequency() {
981 static $jobFrequency = NULL;
982 if (!$jobFrequency) {
983 $jobFrequency = array(
984 'Daily' => ts('Daily'),
985 'Hourly' => ts('Hourly'),
986 'Always' => ts('Every time cron job is run'),
990 return $jobFrequency;
994 * Search builder operators
996 static function getSearchBuilderOperators() {
997 static $searchBuilderOperators = NULL;
998 if (!$searchBuilderOperators) {
999 $searchBuilderOperators = array(
1007 'LIKE' => ts('Like'),
1008 'RLIKE' => ts('Regex'),
1009 'IS EMPTY' => ts('Is Empty'),
1010 'IS NOT EMPTY' => ts('Not Empty'),
1011 'IS NULL' => ts('Is Null'),
1012 'IS NOT NULL' => ts('Not Null'),
1016 return $searchBuilderOperators;
1020 * profile group types
1024 static function getProfileGroupType() {
1025 static $profileGroupType = NULL;
1026 if (!$profileGroupType) {
1027 $profileGroupType = array(
1028 'Activity' => ts('Activities'),
1029 'Contribution' => ts('Contributions'),
1030 'Membership' => ts('Memberships'),
1031 'Participant' => ts('Participants'),
1033 $contactTypes = self
::contactType();
1034 $contactTypes = !empty($contactTypes) ?
array('Contact' => 'Contacts') +
$contactTypes : array();
1035 $profileGroupType = array_merge($contactTypes, $profileGroupType );
1037 return $profileGroupType;
1042 * word replacement match type
1044 static function getWordReplacementMatchType() {
1045 static $wordReplacementMatchType = NULL;
1046 if (!$wordReplacementMatchType) {
1047 $wordReplacementMatchType = array(
1048 'exactMatch' => ts('Exact Match'),
1049 'wildcardMatch' => ts('Wildcard Match'),
1053 return $jobFrequency;
1057 * mailing group types
1059 static function getMailingGroupTypes() {
1060 static $mailingGroupTypes = NULL;
1061 if (!$mailingGroupTypes) {
1062 $mailingGroupTypes = array(
1063 'Include' => ts('Include'),
1064 'Exclude' => ts('Exclude'),
1065 'Base' => ts('Base'),
1068 return $mailingGroupTypes;
1072 * Mailing Job Status
1074 static function geMailingJobStatus() {
1075 static $mailingJobStatus = NULL;
1076 if (!$mailingJobStatus) {
1077 $mailingJobStatus = array(
1078 'Scheduled' => ts('Scheduled'),
1079 'Running' => ts('Running'),
1080 'Complete' => ts('Complete'),
1081 'Paused' => ts('Paused'),
1082 'Canceled' => ts('Canceled'),
1086 return $mailingJobStatus;