- 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)),
+ );