<?php
-
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* In case of updating existing grant, id of that particular grant must
* be in $params array.
*
- * @param array $params Associative array of property
+ * @param array $params
+ * Associative array of property.
* name/value pairs to insert in new 'grant'
*
- * @return array grant array
+ * @return array
+ * grant array
* {@getfields grant_create}
- * @access public
*/
function civicrm_api3_grant_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Grant');
* Adjust Metadata for Create action
*
* The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * @param array $params
+ * Array or parameters determined by getfields.
*/
function _civicrm_api3_grant_create_spec(&$params) {
$params['grant_type_id']['api.required'] = 1;
+ $params['status_id']['api.aliases'] = array('grant_status');
}
/**
* Returns array of grants matching a set of one or more group properties
*
- * @param array $params Array of one or more valid
+ * @param array $params
+ * Array of one or more valid.
* property_name=>value pairs. If $params is set
* as null, all grants will be returned
*
- * @return array Array of matching grants
+ * @return array
+ * Array of matching grants
* {@getfields grant_get}
- * @access public
*/
function civicrm_api3_grant_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Grant');
* This method is used to delete any existing grant. id of the group
* to be deleted is required field in $params array
*
- * @param array $params array containing id of the group
+ * @param array $params
+ * Array containing id of the group.
* to be deleted
*
- * @return array API Result Array
+ * @return array
+ * API Result Array
* {@getfields grant_delete}
- * @access public
*/
function civicrm_api3_grant_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-