CRM-14449 stdise group api so it gets custom fields & works with getlist
[civicrm-core.git] / api / v3 / PriceFieldValue.php
index 8aae82c36d642b957de18358ef17969d08cc755a..bb82de2ec0c411b18fa9acae45e9c3e8f7e87440 100644 (file)
@@ -2,9 +2,9 @@
 /*
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -52,7 +52,7 @@ function civicrm_api3_price_field_value_create($params) {
     $ids['id'] = $params['id'];
   }
 
-  $bao = CRM_Price_BAO_FieldValue::create($params, $ids);
+  $bao = CRM_Price_BAO_PriceFieldValue::create($params, $ids);
 
   $values = array();
   _civicrm_api3_object_to_array($bao, $values[$bao->id]);
@@ -67,6 +67,7 @@ function civicrm_api3_price_field_value_create($params) {
  * @param array $params array or parameters determined by getfields
  */
 function _civicrm_api3_price_field_value_create_spec(&$params) {
+  $params['price_field_id']['api.required'] = TRUE;
 }
 
 /**