<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* Preferred mail format
* @static
*/
- static function pmf() {
+ public static function pmf() {
return array(
'Both' => ts('Both'),
'HTML' => ts('HTML'),
* Privacy options
* @static
*/
- static function privacy() {
+ public static function privacy() {
return array(
'do_not_phone' => ts('Do not phone'),
'do_not_email' => ts('Do not email'),
* Various pre defined contact super types
* @static
*/
- static function contactType() {
+ public static function contactType() {
static $contactType = NULL;
if (!$contactType) {
$contactType = CRM_Contact_BAO_ContactType::basicTypePairs();
* Various pre defined unit list
* @static
*/
- static function unitList($unitType = NULL) {
+ public static function unitList($unitType = NULL) {
$unitList = array(
'day' => ts('day'),
'month' => ts('month'),
* Membership type unit
* @static
*/
- static function membershipTypeUnitList( ) {
+ public static function membershipTypeUnitList() {
return self::unitList('duration');
}
* Various pre defined period types
* @static
*/
- static function periodType() {
+ public static function periodType() {
return array(
'rolling' => ts('Rolling'),
'fixed' => ts('Fixed'),
* Various pre defined email selection methods
* @static
*/
- static function emailSelectMethods() {
+ public static function emailSelectMethods() {
return array(
'automatic' => ts("Automatic"),
'location-only' => ts("Only send to email addresses assigned to the specified location"),
'location-prefer' => ts("Prefer email addresses assigned to the specified location"),
- 'location-exclude' => ts("Exclude email addresses assigned to the specified location")
+ 'location-exclude' => ts("Exclude email addresses assigned to the specified location"),
);
}
* Various pre defined member visibility options
* @static
*/
- static function memberVisibility() {
+ public static function memberVisibility() {
return array(
'Public' => ts('Public'),
'Admin' => ts('Admin'),
);
}
+ /**
+ * Member auto-renew options
+ * @static
+ */
+ public static function memberAutoRenew() {
+ return array(
+ ts('No auto-renew option'),
+ ts('Give option, but not required'),
+ ts('Auto-renew required'),
+ );
+ }
+
/**
* Various pre defined event dates
* @static
*/
- static function eventDate() {
+ public static function eventDate() {
return array(
'start_date' => ts('start date'),
'end_date' => ts('end date'),
* Custom form field types
* @static
*/
- static function customHtmlType() {
+ public static function customHtmlType() {
return array(
'Text' => ts('Single-line input field (text or numeric)'),
'TextArea' => ts('Multi-line text box (textarea)'),
*
* @static
*/
- static function customGroupExtends() {
+ public static function customGroupExtends() {
$customGroupExtends = array(
'Activity' => ts('Activities'),
'Relationship' => ts('Relationships'),
*
* @static
*/
- static function customGroupStyle() {
+ public static function customGroupStyle() {
return array(
'Tab' => ts('Tab'),
'Inline' => ts('Inline'),
*
* @static
*/
- static function ufGroupTypes() {
+ public static function ufGroupTypes() {
$ufGroupType = array(
'Profile' => ts('Standalone Form or Directory'),
'Search Profile' => ts('Search Views'),
*
* @static
*/
- static function groupContactStatus() {
+ public static function groupContactStatus() {
return array(
'Added' => ts('Added'),
'Removed' => ts('Removed'),
* List of Group Types
* @static
*/
- static function groupType() {
+ public static function groupType() {
return array(
'query' => ts('Dynamic'),
'static' => ts('Static'),
/**
* Compose the parameters for a date select object
*
- * @param string|NULL $type the type of date
- * @param string|NULL $format date format ( QF format)
+ * @param string|NULL $type the type of date
+ * @param string|NULL $format date format ( QF format)
*
* @param null $minOffset
* @param null $maxOffset
* @return array the date array
* @static
*/
- static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
+ public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
$date = array(
'addEmptyOption' => TRUE,
*
* @static
*/
- static function ufVisibility() {
+ public static function ufVisibility() {
return array(
'User and User Admin Only' => ts('User and User Admin Only'),
'Public Pages' => ts('Public Pages'),
*
* @static
*/
- static function groupVisibility() {
+ public static function groupVisibility() {
return array(
'User and User Admin Only' => ts('User and User Admin Only'),
'Public Pages' => ts('Public Pages'),
* @static
* return array
*/
- static function mailingComponents() {
- return array('Header' => ts('Header'),
+ public static function mailingComponents() {
+ return array(
+ 'Header' => ts('Header'),
'Footer' => ts('Footer'),
'Reply' => ts('Reply Auto-responder'),
'OptOut' => ts('Opt-out Message'),
*
* @static
*/
- function getHours() {
+ public function getHours() {
$hours = array();
for ($i = 0; $i <= 6; $i++) {
$hours[$i] = $i;
*
* @static
*/
- function getMinutes() {
+ public function getMinutes() {
$minutes = array();
for ($i = 0; $i < 60; $i = $i + 15) {
$minutes[$i] = $i;
* @return array $map array of map providers
* @static
*/
- static function mapProvider() {
+ public static function mapProvider() {
static $map = NULL;
if (!$map) {
$map = CRM_Utils_System::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
* @return array $geo array of geocoder providers
* @static
*/
- static function geoProvider() {
+ public static function geoProvider() {
static $geo = NULL;
if (!$geo) {
$geo = CRM_Utils_System::getPluginList('CRM/Utils/Geocode');
* @return array $addr array of address standardization providers
* @static
*/
- static function addressProvider() {
+ public static function addressProvider() {
static $addr = NULL;
if (!$addr) {
$addr = CRM_Utils_System::getPluginList('CRM/Utils/Address', '.php', array('BatchUpdate'));
* @static
* return array
*/
- static function mailingTokens() {
+ public static function mailingTokens() {
return array(
'{action.unsubscribe}' => ts('Unsubscribe via email'),
'{action.unsubscribeUrl}' => ts('Unsubscribe via web page'),
* @static
* return array
*/
- static function activityTokens() {
+ public static function activityTokens() {
return array(
'{activity.activity_id}' => ts('Activity ID'),
'{activity.subject}' => ts('Activity Subject'),
* @static
* return array
*/
- static function membershipTokens() {
+ public static function membershipTokens() {
return array(
'{membership.id}' => ts('Membership ID'),
'{membership.status}' => ts('Membership Status'),
* @static
* return array
*/
- static function eventTokens() {
+ public static function eventTokens() {
return array(
'{event.event_id}' => ts('Event ID'),
'{event.title}' => ts('Event Title'),
'{event.fee_amount}' => ts('Event Fees'),
'{event.info_url}' => ts('Event Info URL'),
'{event.registration_url}' => ts('Event Registration URL'),
- '{event.balance}' => ts('Event Balance')
+ '{event.balance}' => ts('Event Balance'),
);
}
* @static
* return array
*/
- static function contributionTokens() {
+ public static function contributionTokens() {
return array(
'{contribution.contribution_id}' => ts('Contribution ID'),
'{contribution.total_amount}' => ts('Total Amount'),
* @static
* return array
*/
- static function contactTokens() {
+ public static function contactTokens() {
static $tokens = NULL;
if (!$tokens) {
- $additionalFields = array('checksum' => array('title' => ts('Checksum')),
+ $additionalFields = array(
+ 'checksum' => array('title' => ts('Checksum')),
'contact_id' => array('title' => ts('Internal Contact ID')),
);
$exportFields = array_merge(CRM_Contact_BAO_Contact::exportableFields(), $additionalFields);
* @static
* return array
*/
- static function participantTokens() {
+ public static function participantTokens() {
static $tokens = NULL;
if (!$tokens) {
$exportFields = CRM_Event_BAO_Participant::exportableFields();
/**
* CiviCRM supported date input formats
*/
- static function getDatePluginInputFormats() {
+ public static function getDatePluginInputFormats() {
$dateInputFormats = array(
"mm/dd/yy" => ts('mm/dd/yyyy (12/31/2009)'),
"dd/mm/yy" => ts('dd/mm/yyyy (31/12/2009)'),
gives proper result
*/
-
return $dateInputFormats;
}
/**
* Map date plugin and actual format that is used by PHP
*/
- static function datePluginToPHPFormats() {
+ public static function datePluginToPHPFormats() {
$dateInputFormats = array(
"mm/dd/yy" => 'm/d/Y',
"dd/mm/yy" => 'd/m/Y',
/**
* Time formats
*/
- static function getTimeFormats() {
+ public static function getTimeFormats() {
return array(
'1' => ts('12 Hours'),
'2' => ts('24 Hours'),
public static function getNumericOptions($start = 0, $end = 10) {
$numericOptions = array();
for ($i = $start; $i <= $end; $i++) {
- $numericOptions[$i] = $i;
+ $numericOptions[$i] = $i;
}
return $numericOptions;
}
* Barcode types
* @static
*/
- static function getBarcodeTypes() {
+ public static function getBarcodeTypes() {
return array(
'barcode' => ts('Linear (1D)'),
'qrcode' => ts('QR code'),
/**
* Dedupe rule types
*/
- static function getDedupeRuleTypes() {
+ public static function getDedupeRuleTypes() {
return array(
'Unsupervised' => ts('Unsupervised'),
'Supervised' => ts('Supervised'),
/**
* Campaign group types
*/
- static function getCampaignGroupTypes() {
+ public static function getCampaignGroupTypes() {
return array(
'Include' => ts('Include'),
'Exclude' => ts('Exclude'),
/**
* Subscription history method
*/
- static function getSubscriptionHistoryMethods() {
+ public static function getSubscriptionHistoryMethods() {
return array(
'Admin' => ts('Admin'),
'Email' => ts('Email'),
/**
* Premium units
*/
- static function getPremiumUnits() {
+ public static function getPremiumUnits() {
return array(
'day' => ts('Day'),
'week' => ts('Week'),
/**
* Extension types
*/
- static function getExtensionTypes() {
- return array(
+ public static function getExtensionTypes() {
+ return array(
'payment' => ts('Payment'),
'search' => ts('Search'),
'report' => ts('Report'),
/**
* Job frequency
*/
- static function getJobFrequency() {
+ public static function getJobFrequency() {
return array(
'Daily' => ts('Daily'),
'Hourly' => ts('Hourly'),
/**
* Search builder operators
*/
- static function getSearchBuilderOperators() {
+ public static function getSearchBuilderOperators() {
return array(
'=' => '=',
'!=' => '≠',
*
* @static
*/
- static function getProfileGroupType() {
+ public static function getProfileGroupType() {
$profileGroupType = array(
'Activity' => ts('Activities'),
'Contribution' => ts('Contributions'),
);
$contactTypes = self::contactType();
$contactTypes = !empty($contactTypes) ? array('Contact' => 'Contacts') + $contactTypes : array();
- $profileGroupType = array_merge($contactTypes, $profileGroupType );
+ $profileGroupType = array_merge($contactTypes, $profileGroupType);
return $profileGroupType;
}
/**
* Word replacement match type
*/
- static function getWordReplacementMatchType() {
+ public static function getWordReplacementMatchType() {
return array(
'exactMatch' => ts('Exact Match'),
'wildcardMatch' => ts('Wildcard Match'),
/**
* Mailing group types
*/
- static function getMailingGroupTypes() {
+ public static function getMailingGroupTypes() {
return array(
'Include' => ts('Include'),
'Exclude' => ts('Exclude'),
/**
* Mailing Job Status
*/
- static function getMailingJobStatus() {
+ public static function getMailingJobStatus() {
return array(
'Scheduled' => ts('Scheduled'),
'Running' => ts('Running'),
);
}
- static function billingMode() {
+ public static function billingMode() {
return array(
CRM_Core_Payment::BILLING_MODE_FORM => 'form',
CRM_Core_Payment::BILLING_MODE_BUTTON => 'button',
/**
* Frequency unit for schedule reminders
*/
- static function getScheduleReminderFrequencyUnits() {
+ public static function getScheduleReminderFrequencyUnits() {
//@todo update schema to refer to option group direct & remove this
static $scheduleReminderFrequencyUnits = NULL;
if (!$scheduleReminderFrequencyUnits) {