<?php
-// $Id$
/*
+--------------------------------------------------------------------+
* @access public
*/
function civicrm_api3_custom_group_create($params) {
- if (is_string($params['extends'])) {
+ if (isset($params['extends']) && is_string($params['extends'])) {
$extends = explode(",", $params['extends']);
unset($params['extends']);
$params['extends'] = $extends;
return civicrm_api3_create_success($values, $params, 'custom_group', $customGroup);
}
-/*
+/**
* Adjust Metadata for Create action
*
* @param array $params array or parameters determined by getfields
$params['extends']['api.required'] = 1;
$params['title']['api.required'] = 1;
$params['style']['api.default'] = 'Inline';
+ $params['is_active']['api.default'] = 1;
}
/**
$values->id = $params['id'];
$values->find(TRUE);
- require_once 'CRM/Core/BAO/CustomGroup.php';
$result = CRM_Core_BAO_CustomGroup::deleteGroup($values, TRUE);
return $result ? civicrm_api3_create_success() : civicrm_api3_create_error('Error while deleting custom group');
}