+--------------------------------------------------------------------+
*/
-
/**
* This api exposes CiviCRM LocBlock records.
*
* Create or update a LocBlock.
*
* @param array $params
- * name/value pairs to insert in new 'LocBlock'
+ * Name/value pairs to insert in new 'LocBlock'.
*
* @return array
* API result array.
'im',
'im_id',
'email',
- 'email_id'
+ 'email_id',
);
civicrm_api3_verify_one_mandatory($params, NULL, $any_mandatory);
// Call the appropriate api to create entities if any are passed in the params.
$key = $item . $suf;
if (!empty($params[$key]) && is_array($params[$key])) {
$info = $params[$key];
- // If all we get is an id don't bother calling the api
+ // If all we get is an id don't bother calling the api.
if (count($info) == 1 && !empty($info['id'])) {
$params[$key . '_id'] = $info['id'];
}
- // Bother calling the api
+ // Bother calling the api.
else {
$info['contact_id'] = CRM_Utils_Array::value('contact_id', $info, 'null');
$result = civicrm_api3($item, 'create', $info);
*
* @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
* API result array.
function civicrm_api3_loc_block_get($params) {
$options = _civicrm_api3_get_options_from_params($params);
// If a return param has been set then fetch the appropriate fk objects
- // This is a helper because api chaining does not work with a key like 'email_2'
+ // This is a helper because api chaining does not work with a key like 'email_2'.
if (!empty($options['return'])) {
unset($params['return']);
$values = array();