$links = self::links();
}
- $batchTypes = CRM_Core_PseudoConstant::getBatchType();
- $batchStatus = CRM_Core_PseudoConstant::getBatchStatus();
+ $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id');
+ $batchStatus = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'status_id');
$paymentInstrument = CRM_Contribute_PseudoConstant::paymentInstrument();
$results = array();
$attributes = CRM_Core_DAO::getAttribute('CRM_Batch_DAO_Batch');
$this->add('text', 'title', ts('Batch Name'), $attributes['name'], TRUE);
- $batchTypes = CRM_Core_PseudoConstant::getBatchType();
+ $batchTypes = CRM_Core_PseudoConstant::get('CRM_Batch_DAO_Batch', 'type_id');
+
// unset non-related types
unset($batchTypes[3]);
unset($batchTypes[4]);
*/
private static $batchModes;
- /**
- * batch type options
- * @var array
- * @static
- */
- private static $batchTypes;
-
- /**
- * batch status options
- * @var array
- * @static
- */
- private static $batchStatues;
-
/**
* contact Type
* @var array
return self::$batchModes;
}
- /**
- * Get all batch types
- *
- * The static array batchTypes
- *
- * @access public
- * @static
- *
- * @return array - array reference of all batch types
- */
- public static function &getBatchType() {
- if (!self::$batchTypes) {
- self::$batchTypes = CRM_Core_OptionGroup::values('batch_type');
- }
-
- return self::$batchTypes;
- }
-
- /**
- * Get all batch statuses
- *
- * The static array batchStatues
- *
- * @access public
- * @static
- *
- * @return array - array reference of all batch statuses
- */
- public static function &getBatchStatus() {
- if (!self::$batchStatues) {
- self::$batchStatues = CRM_Core_OptionGroup::values('batch_status');
- }
-
- return self::$batchStatues;
- }
-
/*
* The static array contactType is returned
*
// - sample: Any one value which is expected in the list of option values.
// - max: integer (default = 10) maximum number of option values expected.
$fields = array(
+ 'CRM_Batch_DAO_Batch' => array(
+ array(
+ 'fieldName' => 'type_id',
+ 'sample' => 'Membership',
+ ),
+ array(
+ 'fieldName' => 'status_id',
+ 'sample' => 'Reopened',
+ ),
+ ),
'CRM_Project_DAO_Task' => array(
array(
'fieldName' => 'priority_id',
<required>true</required>
<comment>fk to Batch Status options in civicrm_option_values</comment>
<add>4.2</add>
+ <pseudoconstant>
+ <optionGroupName>batch_status</optionGroupName>
+ </pseudoconstant>
</field>
<field>
<name>type_id</name>
<type>int unsigned</type>
<comment>fk to Batch Type options in civicrm_option_values</comment>
<add>4.2</add>
+ <pseudoconstant>
+ <optionGroupName>batch_type</optionGroupName>
+ </pseudoconstant>
</field>
<field>
<name>mode_id</name>