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'),
282 return $customGroupStyle;
286 * for displaying the uf group types
290 static function &ufGroupTypes() {
291 static $ufGroupType = NULL;
293 $ufGroupType = array(
294 'Profile' => ts('Standalone Form or Directory'),
295 'Search Profile' => ts('Search Views'),
297 $config = CRM_Core_Config
::singleton();
298 if ($config->userSystem
->supports_form_extensions
) {
299 $ufGroupType +
= array(
300 'User Registration' => ts('Drupal User Registration'),
301 'User Account' => ts('View/Edit Drupal User Account'),
309 * the status of a contact within a group
313 static function &groupContactStatus() {
314 static $groupContactStatus = NULL;
315 if (!$groupContactStatus) {
316 $groupContactStatus = array(
317 'Added' => ts('Added'),
318 'Removed' => ts('Removed'),
319 'Pending' => ts('Pending'),
322 return $groupContactStatus;
326 * list of Group Types
329 static function &groupType() {
330 static $groupType = NULL;
333 'query' => ts('Dynamic'),
334 'static' => ts('Static'),
341 * compose the parameters for a date select object
343 * @param $type the type of date
344 * @param $format date format ( QF format)
346 * @return array the date array
349 static function &date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
352 'addEmptyOption' => TRUE,
353 'emptyOptionText' => ts('- select -'),
354 'emptyOptionValue' => '',
358 $date['format'] = $format;
362 $dao = new CRM_Core_DAO_PreferencesDate();
364 if (!$dao->find(TRUE)) {
365 CRM_Core_Error
::fatal();
369 if ($type == 'creditCard') {
370 $minOffset = $dao->start
;
371 $maxOffset = $dao->end
;
372 $date['format'] = $dao->date_format
;
373 $date['addEmptyOption'] = TRUE;
374 $date['emptyOptionText'] = ts('- select -');
375 $date['emptyOptionValue'] = '';
378 if (empty($date['format'])) {
379 $date['format'] = 'M d';
384 $date['minYear'] = $year - $minOffset;
385 $date['maxYear'] = $year +
$maxOffset;
390 * values for UF form visibility options
394 static function ufVisibility($isGroup = FALSE) {
395 static $_visibility = NULL;
397 $_visibility = array(
398 'User and User Admin Only' => ts('User and User Admin Only'),
399 'Public Pages' => ts('Public Pages'),
400 'Public Pages and Listings' => ts('Public Pages and Listings'),
403 unset($_visibility['Public Pages and Listings']);
410 * values for group form visibility options
414 static function groupVisibility() {
415 static $_groupVisibility = NULL;
416 if (!$_groupVisibility) {
417 $_groupVisibility = self
::ufVisibility(true);
419 return $_groupVisibility;
423 * different type of Mailing Components
428 static function &mailingComponents() {
429 static $components = NULL;
432 $components = array('Header' => ts('Header'),
433 'Footer' => ts('Footer'),
434 'Reply' => ts('Reply Auto-responder'),
435 'OptOut' => ts('Opt-out Message'),
436 'Subscribe' => ts('Subscription Confirmation Request'),
437 'Welcome' => ts('Welcome Message'),
438 'Unsubscribe' => ts('Unsubscribe Message'),
439 'Resubscribe' => ts('Resubscribe Message'),
446 * Function to get hours
451 function getHours() {
452 for ($i = 0; $i <= 6; $i++
) {
459 * Function to get minutes
464 function getMinutes() {
465 for ($i = 0; $i < 60; $i = $i +
15) {
472 * Function to get the Map Provider
474 * @return array $map array of map providers
477 static function mapProvider() {
480 return CRM_Utils_System
::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
486 * Function to get the Geocoding Providers from available plugins
488 * @return array $geo array of geocoder providers
491 static function geoProvider() {
494 return CRM_Utils_System
::getPluginList('CRM/Utils/Geocode');
500 * Function to get the Address Standardization Providers from available
503 * @return array $addr array of address standardization providers
506 static function addressProvider() {
509 return CRM_Utils_System
::getPluginList('CRM/Utils/Address',
518 * different type of Mailing Tokens
523 static function &mailingTokens() {
524 static $tokens = NULL;
527 $tokens = array('{action.unsubscribe}' => ts('Unsubscribe via email'),
528 '{action.unsubscribeUrl}' => ts('Unsubscribe via web page'),
529 '{action.resubscribe}' => ts('Resubscribe via email'),
530 '{action.resubscribeUrl}' => ts('Resubscribe via web page'),
531 '{action.optOut}' => ts('Opt out via email'),
532 '{action.optOutUrl}' => ts('Opt out via web page'),
533 '{action.forward}' => ts('Forward this email (link)'),
534 '{action.reply}' => ts('Reply to this email (link)'),
535 '{action.subscribeUrl}' => ts('Subscribe via web page'),
536 '{domain.name}' => ts('Domain name'),
537 '{domain.address}' => ts('Domain (organization) address'),
538 '{domain.phone}' => ts('Domain (organization) phone'),
539 '{domain.email}' => ts('Domain (organization) email'),
540 '{mailing.name}' => ts('Mailing name'),
541 '{mailing.group}' => ts('Mailing group'),
542 '{mailing.viewUrl}' => ts('Mailing permalink'),
549 * different type of Activity Tokens
554 static function &activityTokens() {
555 static $tokens = NULL;
559 '{activity.activity_id}' => ts('Activity ID'),
560 '{activity.subject}' => ts('Activity Subject'),
561 '{activity.details}' => ts('Activity Details'),
562 '{activity.activity_date_time}' => ts('Activity Date Time'),
569 * different type of Membership Tokens
574 static function &membershipTokens() {
575 static $tokens = NULL;
579 '{membership.id}' => ts('Membership ID'),
580 '{membership.status}' => ts('Membership Status'),
581 '{membership.type}' => ts('Membership Type'),
582 '{membership.start_date}' => ts('Membership Start Date'),
583 '{membership.join_date}' => ts('Membership Join Date'),
584 '{membership.end_date}' => ts('Membership End Date'),
585 '{membership.fee}' => ts('Membership Fee'),
592 * different type of Event Tokens
597 static function &eventTokens() {
598 static $tokens = NULL;
602 '{event.event_id}' => ts('Event ID'),
603 '{event.title}' => ts('Event Title'),
604 '{event.start_date}' => ts('Event Start Date'),
605 '{event.end_date}' => ts('Event End Date'),
606 '{event.event_type}' => ts('Event Type'),
607 '{event.summary}' => ts('Event Summary'),
608 '{event.description}' => ts('Event Description'),
609 '{event.contact_email}' => ts('Event Contact Email'),
610 '{event.contact_phone}' => ts('Event Contact Phone'),
611 '{event.location}' => ts('Event Location'),
612 '{event.description}' => ts('Event Description'),
613 '{event.location}' => ts('Event Location'),
614 '{event.fee_amount}' => ts('Event Fees'),
615 '{event.info_url}' => ts('Event Info URL'),
616 '{event.registration_url}' => ts('Event Registration URL'),
617 '{event.balance}' => ts('Event Balance')
624 * different type of Event Tokens
629 static function &contributionTokens() {
630 static $tokens = NULL;
634 '{contribution.contribution_id}' => ts('Contribution ID'),
635 '{contribution.total_amount}' => ts('Total Amount'),
636 '{contribution.fee_amount}' => ts('Fee Amount'),
637 '{contribution.net_amount}' => ts('Net Amount'),
638 '{contribution.non_deductible_amount}' => ts('Non Deductible Amount'),
639 '{contribution.receive_date}' => ts('Contribution Receive Date'),
640 '{contribution.payment_instrument}' => ts('Payment Instrument'),
641 '{contribution.trxn_id}' => ts('Transaction ID'),
642 '{contribution.invoice_id}' => ts('Invoice ID'),
643 '{contribution.currency}' => ts('Currency'),
644 '{contribution.cancel_date}' => ts('Contribution Cancel Date'),
645 '{contribution.cancel_reason}' => ts('Contribution Cancel Reason'),
646 '{contribution.receipt_date}' => ts('Receipt Date'),
647 '{contribution.thankyou_date}' => ts('Thank You Date'),
648 '{contribution.contribution_source}' => ts('Contribution Source'),
649 '{contribution.amount_level}' => ts('Amount Level'),
650 //'{contribution.contribution_recur_id}' => ts('Contribution Recurring ID'),
651 //'{contribution.honor_contact_id}' => ts('Honor Contact ID'),
652 '{contribution.contribution_status_id}' => ts('Contribution Status'),
653 //'{contribution.honor_type_id}' => ts('Honor Type ID'),
654 //'{contribution.address_id}' => ts('Address ID'),
655 '{contribution.check_number}' => ts('Check Number'),
656 '{contribution.campaign}' => ts('Contribution Campaign'),
663 * different type of Contact Tokens
668 static function &contactTokens() {
669 static $tokens = NULL;
671 $additionalFields = array('checksum' => array('title' => ts('Checksum')),
672 'contact_id' => array('title' => ts('Internal Contact ID')),
674 $exportFields = array_merge(CRM_Contact_BAO_Contact
::exportableFields(), $additionalFields);
676 $values = array_merge(array_keys($exportFields));
679 //FIXME:skipping some tokens for time being.
681 'is_bulkmail', 'group', 'tag', 'contact_sub_type', 'note',
682 'is_deceased', 'deceased_date', 'legal_identifier', 'contact_sub_type', 'user_unique_id',
685 $customFields = CRM_Core_BAO_CustomField
::getFields('Individual');
686 $customFieldsAddress = CRM_Core_BAO_CustomField
::getFields('Address');
687 $customFields = $customFields +
$customFieldsAddress;
688 $legacyTokenNames = array_flip(CRM_Utils_Token
::legacyContactTokens());
690 foreach ($values as $val) {
691 if (in_array($val, $skipTokens)) {
694 //keys for $tokens should be constant. $token Values are changed for Custom Fields. CRM-3734
695 if ($customFieldId = CRM_Core_BAO_CustomField
::getKeyID($val)) {
696 $tokens["{contact.$val}"] = !empty($customFields[$customFieldId]) ?
$customFields[$customFieldId]['label'] . " :: " . $customFields[$customFieldId]['groupTitle'] : '';
699 // Support legacy token names
700 $tokenName = CRM_Utils_Array
::value($val, $legacyTokenNames, $val);
701 $tokens["{contact.$tokenName}"] = $exportFields[$val]['title'];
705 // might as well get all the hook tokens to
706 $hookTokens = array();
707 CRM_Utils_Hook
::tokens($hookTokens);
708 foreach ($hookTokens as $category => $tokenValues) {
709 foreach ($tokenValues as $key => $value) {
710 if (is_numeric($key)) {
713 if (!preg_match('/^\{[^\}]+\}$/', $key)) {
714 $key = '{' . $key . '}';
716 if (preg_match('/^\{([^\}]+)\}$/', $value, $matches)) {
717 $value = $matches[1];
719 $tokens[$key] = $value;
728 * different type of Participant Tokens
733 static function &participantTokens() {
734 static $tokens = NULL;
736 $exportFields = CRM_Event_BAO_Participant
::exportableFields();
738 $values = array_merge(array_keys($exportFields));
741 // skipping some tokens for time being.
743 'event_id', 'participant_is_pay_later', 'participant_is_test', 'participant_contact_id',
744 'participant_fee_currency', 'participant_campaign_id', 'participant_status', 'participant_discount_name',
747 $customFields = CRM_Core_BAO_CustomField
::getFields('Participant');
749 foreach ($values as $key => $val) {
750 if (in_array($val, $skipTokens)) {
753 //keys for $tokens should be constant. $token Values are changed for Custom Fields. CRM-3734
754 if ($customFieldId = CRM_Core_BAO_CustomField
::getKeyID($val)) {
755 $tokens["{participant.$val}"] = !empty($customFields[$customFieldId]) ?
$customFields[$customFieldId]['label'] . " :: " . $customFields[$customFieldId]['groupTitle'] : '';
758 $tokens["{participant.$val}"] = $exportFields[$val]['title'];
766 * get qf mappig for all date parts.
769 static function &qfDatePartsMapping() {
770 static $qfDatePartsMapping = NULL;
771 if (!$qfDatePartsMapping) {
772 $qfDatePartsMapping = array(
791 return $qfDatePartsMapping;
795 * CiviCRM supported date input formats
797 static function getDatePluginInputFormats() {
798 $dateInputFormats = array(
799 "mm/dd/yy" => ts('mm/dd/yyyy (12/31/2009)'),
800 "dd/mm/yy" => ts('dd/mm/yyyy (31/12/2009)'),
801 "yy-mm-dd" => ts('yyyy-mm-dd (2009-12-31)'),
802 "dd-mm-yy" => ts('dd-mm-yyyy (31-12-2009)'),
803 'dd.mm.yy' => ts('dd.mm.yyyy (31.12.2009)'),
804 "M d, yy" => ts('M d, yyyy (Dec 31, 2009)'),
805 'd M yy' => ts('d M yyyy (31 Dec 2009)'),
806 "MM d, yy" => ts('MM d, yyyy (December 31, 2009)'),
807 'd MM yy' => ts('d MM yyyy (31 December 2009)'),
808 "DD, d MM yy" => ts('DD, d MM yyyy (Thursday, 31 December 2009)'),
809 "mm/dd" => ts('mm/dd (12/31)'),
810 "dd-mm" => ts('dd-mm (31-12)'),
811 "yy-mm" => ts('yyyy-mm (2009-12)'),
812 'M yy' => ts('M yyyy (Dec 2009)'),
813 "yy" => ts('yyyy (2009)'),
817 Year greater than 2000 get wrong result for following format
818 echo date( 'Y-m-d', strtotime( '7 Nov, 2001') );
819 echo date( 'Y-m-d', strtotime( '7 November, 2001') );
821 expected :: 2001-11-07
824 echo date( 'Y-m-d', strtotime( 'Nov 7, 2001') );
825 echo date( 'Y-m-d', strtotime( 'November 7, 2001') );
830 return $dateInputFormats;
834 * Map date plugin and actual format that is used by PHP
836 static function datePluginToPHPFormats() {
837 $dateInputFormats = array(
838 "mm/dd/yy" => 'm/d/Y',
839 "dd/mm/yy" => 'd/m/Y',
840 "yy-mm-dd" => 'Y-m-d',
841 "dd-mm-yy" => 'd-m-Y',
842 "dd.mm.yy" => 'd.m.Y',
843 "M d, yy" => 'M j, Y',
845 "MM d, yy" => 'F j, Y',
846 "d MM yy" => 'j F Y',
847 "DD, d MM yy" => 'l, j F Y',
854 return $dateInputFormats;
860 static function getTimeFormats() {
861 $timeFormats = array('1' => ts('12 Hours'),
862 '2' => ts('24 Hours'),
868 * Function to get numeric options
873 public static function getNumericOptions($start = 0, $end = 10) {
874 for ($i = $start; $i <= $end; $i++
) {
875 $numericOptions[$i] = $i;
877 return $numericOptions;
884 static function getBarcodeTypes() {
885 static $barcodeTypes = NULL;
886 if (!$barcodeTypes) {
887 $barcodeTypes = array(
888 'barcode' => ts('Linear (1D)'),
889 'qrcode' => ts('QR code'),
892 return $barcodeTypes;
898 static function getDedupeRuleTypes() {
899 static $dedupeRuleTypes = NULL;
900 if (!$dedupeRuleTypes) {
901 $dedupeRuleTypes = array(
902 'Unsupervised' => ts('Unsupervised'),
903 'Supervised' => ts('Supervised'),
904 'General' => ts('General'),
907 return $dedupeRuleTypes;
911 * campaign group types
913 static function getCampaignGroupTypes() {
914 static $campaignGroupTypes = NULL;
915 if (!$campaignGroupTypes) {
916 $campaignGroupTypes = array(
917 'Include' => ts('Include'),
918 'Exclude' => ts('Exclude'),
921 return $campaignGroupTypes;
925 * subscription history method
927 static function getSubscriptionHistoryMethods() {
928 static $subscriptionHistoryMethods = NULL;
929 if (!$subscriptionHistoryMethods) {
930 $subscriptionHistoryMethods = array(
931 'Admin' => ts('Admin'),
932 'Email' => ts('Email'),
938 return $subscriptionHistoryMethods;
944 static function getPremiumUnits() {
945 static $premiumUnits = NULL;
946 if (!$premiumUnits) {
947 $premiumUnits = array(
949 'week' => ts('Week'),
950 'month' => ts('Month'),
951 'year' => ts('Year'),
955 return $premiumUnits;
961 static function getExtensionTypes() {
962 static $extensionTypes = NULL;
963 if (!$extensionTypes) {
964 $extensionTypes = array(
965 'payment' => ts('Payment'),
966 'search' => ts('Search'),
967 'report' => ts('Report'),
968 'module' => ts('Module'),
973 return $extensionTypes;
979 static function getJobFrequency() {
980 static $jobFrequency = NULL;
981 if (!$jobFrequency) {
982 $jobFrequency = array(
983 'Daily' => ts('Daily'),
984 'Hourly' => ts('Hourly'),
985 'Always' => ts('Every time cron job is run'),
989 return $jobFrequency;
993 * Search builder operators
995 static function getSearchBuilderOperators() {
996 static $searchBuilderOperators = NULL;
997 if (!$searchBuilderOperators) {
998 $searchBuilderOperators = array(
1006 'LIKE' => ts('Like'),
1007 'RLIKE' => ts('Regex'),
1008 'IS EMPTY' => ts('Is Empty'),
1009 'IS NOT EMPTY' => ts('Not Empty'),
1010 'IS NULL' => ts('Is Null'),
1011 'IS NOT NULL' => ts('Not Null'),
1015 return $searchBuilderOperators;
1019 * profile group types
1023 static function getProfileGroupType() {
1024 static $profileGroupType = NULL;
1025 if (!$profileGroupType) {
1026 $profileGroupType = array(
1027 'Activity' => ts('Activities'),
1028 'Contribution' => ts('Contributions'),
1029 'Membership' => ts('Memberships'),
1030 'Participant' => ts('Participants'),
1032 $contactTypes = self
::contactType();
1033 $contactTypes = !empty($contactTypes) ?
array('Contact' => 'Contacts') +
$contactTypes : array();
1034 $profileGroupType = array_merge($contactTypes, $profileGroupType );
1036 return $profileGroupType;
1041 * word replacement match type
1043 static function getWordReplacementMatchType() {
1044 static $wordReplacementMatchType = NULL;
1045 if (!$wordReplacementMatchType) {
1046 $wordReplacementMatchType = array(
1047 'exactMatch' => ts('Exact Match'),
1048 'wildcardMatch' => ts('Wildcard Match'),
1052 return $jobFrequency;
1056 * mailing group types
1058 static function getMailingGroupTypes() {
1059 static $mailingGroupTypes = NULL;
1060 if (!$mailingGroupTypes) {
1061 $mailingGroupTypes = array(
1062 'Include' => ts('Include'),
1063 'Exclude' => ts('Exclude'),
1064 'Base' => ts('Base'),
1067 return $mailingGroupTypes;
1071 * Mailing Job Status
1073 static function geMailingJobStatus() {
1074 static $mailingJobStatus = NULL;
1075 if (!$mailingJobStatus) {
1076 $mailingJobStatus = array(
1077 'Scheduled' => ts('Scheduled'),
1078 'Running' => ts('Running'),
1079 'Complete' => ts('Complete'),
1080 'Paused' => ts('Paused'),
1081 'Canceled' => ts('Canceled'),
1085 return $mailingJobStatus;