<?php
-/*
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
- * File for the CiviCRM APIv3 loc_block functions
+ * This api exposes CiviCRM LocBlock records.
*
* @package CiviCRM_APIv3
- * @subpackage API_LocBlock
- * @copyright CiviCRM LLC (c) 20042012
*/
/**
- * Create or update a loc_block
+ * Create or update a LocBlock.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'loc_block'
- * @example LocBlockCreate.php Std Create example
+ * name/value pairs to insert in new 'LocBlock'
*
* @return array
- * api result array
- * {@getfields loc_block_create}
- * @access public
+ * API result array.
*/
function civicrm_api3_loc_block_create($params) {
$entities = array();
if (!empty($dao->id)) {
$values = array($dao->id => $entities);
_civicrm_api3_object_to_array($dao, $values[$dao->id]);
- return civicrm_api3_create_success($values, $params, 'loc_block', 'create', $dao);
+ return civicrm_api3_create_success($values, $params, 'LocBlock', 'create', $dao);
}
return civicrm_api3_create_error('Unable to create LocBlock. Please check your params.');
}
/**
- * Returns array of loc_blocks matching a set of one or more properties
+ * Returns array of loc_blocks matching a set of one or more properties.
*
* @param array $params
* Array of one or more valid property_name=>value pairs. If $params is set.
- * as null, all loc_blocks will be returned (default limit is 25)
+ * as null, all loc_blocks will be returned (default limit is 25)
*
* @return array
- * Array of matching loc_blocks
- * {@getfields loc_block_get}
- * @access public
+ * API result array.
*/
function civicrm_api3_loc_block_get($params) {
$options = _civicrm_api3_get_options_from_params($params);
}
$values[$val['id']] = $val;
}
- return civicrm_api3_create_success($values, $params, 'loc_block', 'get');
+ return civicrm_api3_create_success($values, $params, 'LocBlock', 'get');
}
return _civicrm_api3_basic_get('CRM_Core_DAO_LocBlock', $params);
}
/**
- * delete an existing loc_block
- *
- * This method is used to delete any existing loc_block.
- * id of the record to be deleted is required field in $params array
+ * Delete an existing LocBlock.
*
* @param array $params
* Array containing id of the record to be deleted.
*
* @return array
- * API result array
- * {@getfields loc_block_delete}
- * @access public
+ * API result array.
*/
function civicrm_api3_loc_block_delete($params) {
return _civicrm_api3_basic_delete('CRM_Core_DAO_LocBlock', $params);