+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* smart caching scheme on a per domain basis
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Core_SelectValues {
/**
- * Preferred mail format
+ * Yes/No options
+ *
+ * @return array
+ */
+ public static function boolean() {
+ return array(
+ 1 => ts('Yes'),
+ 0 => ts('No'),
+ );
+ }
+
+ /**
+ * Preferred mail format.
*
* @return array
*/
}
/**
- * Privacy options
+ * Privacy options.
*
* @return array
*/
}
/**
- * Various pre defined contact super types
+ * Various pre defined contact super types.
*
* @return array
*/
}
/**
- * Various pre defined unit list
+ * Various pre defined unit list.
*
* @param string $unitType
* @return array
}
/**
- * Membership type unit
+ * Membership type unit.
*
* @return array
*/
}
/**
- * Various pre defined period types
+ * Various pre defined period types.
*
* @return array
*/
}
/**
- * Various pre defined email selection methods
+ * Various pre defined email selection methods.
*
* @return array
*/
}
/**
- * Various pre defined member visibility options
+ * Various pre defined member visibility options.
*
* @return array
*/
}
/**
- * Various pre defined event dates
+ * Various pre defined event dates.
*
* @return array
*/
}
/**
- * Custom form field types
+ * Custom form field types.
*
* @return array
*/
}
/**
- * Various pre defined extensions for dynamic properties and groups
+ * Various pre defined extensions for dynamic properties and groups.
*
* @return array
*
}
/**
- * Styles for displaying the custom data group
+ * Styles for displaying the custom data group.
*
* @return array
- *
*/
public static function customGroupStyle() {
return array(
}
/**
- * For displaying the uf group types
+ * For displaying the uf group types.
*
* @return array
*/
}
/**
- * The status of a contact within a group
+ * The status of a contact within a group.
*
* @return array
- *
*/
public static function groupContactStatus() {
return array(
}
/**
- * List of Group Types
+ * List of Group Types.
*
* @return array
*/
}
/**
- * Compose the parameters for a date select object
+ * Compose the parameters for a date select object.
*
* @param string|NULL $type
* the type of date
}
/**
- * Values for UF form visibility options
+ * Values for UF form visibility options.
*
* @return array
*/
}
/**
- * Values for group form visibility options
+ * Values for group form visibility options.
*
* @return array
*/
}
/**
- * Different type of Mailing Components
+ * Different type of Mailing Components.
*
* @return array
*/
}
/**
- * Get hours
+ * Get hours.
*
* @return array
*/
}
/**
- * Get minutes
+ * Get minutes.
*
* @return array
*/
}
/**
- * Get the Map Provider
+ * Get the Map Provider.
*
* @return array
* array of map providers
}
/**
- * Get the Geocoding Providers from available plugins
+ * Get the Geocoding Providers from available plugins.
*
* @return array
* array of geocoder providers
}
/**
- * Get the Address Standardization Providers from available plugins
+ * Get the Address Standardization Providers from available plugins.
*
* @return array
* array of address standardization providers
}
/**
- * Different type of Mailing Tokens
+ * Different type of Mailing Tokens.
*
* @return array
*/
}
/**
- * Different type of Activity Tokens
+ * Different type of Activity Tokens.
*
* @return array
*/
}
/**
- * Different type of Membership Tokens
+ * Different type of Membership Tokens.
*
* @return array
*/
}
/**
- * Different type of Event Tokens
+ * Different type of Event Tokens.
*
* @return array
*/
}
/**
- * Different type of Event Tokens
+ * Different type of Event Tokens.
*
* @return array
*/
'{contribution.fee_amount}' => ts('Fee Amount'),
'{contribution.net_amount}' => ts('Net Amount'),
'{contribution.non_deductible_amount}' => ts('Non-deductible Amount'),
- '{contribution.receive_date}' => ts('Contribution Receive Date'),
- '{contribution.payment_instrument}' => ts('Payment Instrument'),
+ '{contribution.receive_date}' => ts('Contribution Date Received'),
+ '{contribution.payment_instrument}' => ts('Payment Method'),
'{contribution.trxn_id}' => ts('Transaction ID'),
'{contribution.invoice_id}' => ts('Invoice ID'),
'{contribution.currency}' => ts('Currency'),
}
/**
- * Different type of Contact Tokens
+ * Different type of Contact Tokens.
*
* @return array
*/
}
}
- // might as well get all the hook tokens to
+ // Get all the hook tokens too
$hookTokens = array();
CRM_Utils_Hook::tokens($hookTokens);
foreach ($hookTokens as $tokenValues) {
}
/**
- * Different type of Participant Tokens
+ * Different type of Participant Tokens.
*
* @return array
*/
}
/**
- * CiviCRM supported date input formats
+ * CiviCRM supported date input formats.
*
* @return array
*/
}
/**
- * Map date plugin and actual format that is used by PHP
+ * Map date plugin and actual format that is used by PHP.
*
* @return array
*/
}
/**
- * Time formats
+ * Time formats.
*
* @return array
*/
}
/**
- * Get numeric options
+ * Get numeric options.
*
* @param int $start
* @param int $end
}
/**
- * Barcode types
+ * Barcode types.
*
* @return array
*/
}
/**
- * Dedupe rule types
+ * Dedupe rule types.
*
* @return array
*/
}
/**
- * Campaign group types
+ * Campaign group types.
*
* @return array
*/
}
/**
- * Subscription history method
+ * Subscription history method.
*
* @return array
*/
}
/**
- * Premium units
+ * Premium units.
*
* @return array
*/
}
/**
- * Extension types
+ * Extension types.
*
* @return array
*/
}
/**
- * Job frequency
+ * Job frequency.
*
* @return array
*/
public static function getJobFrequency() {
return array(
+ '1stOfQtr' => ts('1st day of every quarter'),
+ '1stOfMth' => ts('1st day of every month'),
+ 'Mondays' => ts('Monday of every week'),
'Daily' => ts('Daily'),
'Hourly' => ts('Hourly'),
'Always' => ts('Every time cron job is run'),
}
/**
- * Search builder operators
+ * Search builder operators.
*
* @return array
*/
}
/**
- * Profile group types
+ * Profile group types.
*
* @return array
*/
/**
- * Word replacement match type
+ * Word replacement match type.
*
* @return array
*/
}
/**
- * Mailing group types
+ * Mailing group types.
*
* @return array
*/
}
/**
- * Mailing Job Status
+ * Mailing Job Status.
*
* @return array
*/
}
/**
- * Frequency unit for schedule reminders
+ * Frequency unit for schedule reminders.
*
+ * @param int $count
+ * For pluralization
* @return array
*/
- public static function getScheduleReminderFrequencyUnits() {
- //@todo update schema to refer to option group direct & remove this
- static $scheduleReminderFrequencyUnits = NULL;
- if (!$scheduleReminderFrequencyUnits) {
- $scheduleReminderFrequencyUnits = array(
- 'hour' => ts('hour'),
- ) + CRM_Core_OptionGroup::values('recur_frequency_units');
- }
-
- return $scheduleReminderFrequencyUnits;
+ public static function getRecurringFrequencyUnits($count = 1) {
+ // @todo this used to refer to the 'recur_frequency_unit' option_values which
+ // is for recurring payments and probably not good to re-use for recurring entities.
+ // If something other than a hard-coded list is desired, add a new option_group.
+ return array(
+ 'hour' => ts('hour', array('plural' => 'hours', 'count' => $count)),
+ 'day' => ts('day', array('plural' => 'days', 'count' => $count)),
+ 'week' => ts('week', array('plural' => 'weeks', 'count' => $count)),
+ 'month' => ts('month', array('plural' => 'months', 'count' => $count)),
+ 'year' => ts('year', array('plural' => 'years', 'count' => $count)),
+ );
}
}