<?php
-// $Id$
/*
+--------------------------------------------------------------------+
- | 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. |
| |
* @package CiviCRM_APIv3
* @subpackage API_CustomGroup
*
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* @version $Id: CustomGroup.php 30879 2010-11-22 15:45:55Z shot $
*/
* @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');
}
*
* @param array $params Array to search on
*
+ * @return array
* @access public
* {@getfields CustomGroup_get}
* @example CustomGroupGet.php