$attributes['api_action'], TRUE
);
- $this->add('select', 'run_frequency', ts('Run frequency'),
- array('Daily' => ts('Daily'), 'Hourly' => ts('Hourly'), 'Always' => ts('Every time cron job is run'))
- );
-
+ $this->add('select', 'run_frequency', ts('Run frequency'), CRM_Core_SelectValues::getJobFrequency());
$this->add('textarea', 'parameters', ts('Command parameters'),
"cols=50 rows=6"
return $premiumUnits;
}
+
+ /**
+ * extension types
+ */
+ static function getExtensionTypes() {
+ static $extensionTypes = NULL;
+ if (!$extensionTypes) {
+ $extensionTypes = array(
+ 'payment' => ts('Payment'),
+ 'search' => ts('Search'),
+ 'report' => ts('Report'),
+ 'module' => ts('Module'),
+ 'sms' => ts('SMS'),
+ );
+ }
+
+ return $extensionTypes;
+ }
+
+ /**
+ * job frequency
+ */
+ static function getJobFrequency() {
+ static $jobFrequency = NULL;
+ if (!$jobFrequency) {
+ $jobFrequency = array(
+ 'Daily' => ts('Daily'),
+ 'Hourly' => ts('Hourly'),
+ 'Always' => ts('Every time cron job is run'),
+ );
+ }
+
+ return $jobFrequency;
+ }
}
<length>8</length>
<default>"Daily"</default>
<comment>Scheduled job run frequency.</comment>
+ <pseudoconstant>
+ <callback>CRM_Core_SelectValues::getJobFrequency()</callback>
+ </pseudoconstant>
<add>4.1</add>
<html>
<type>Select</type>