<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*/
/**
- * Function to create or update case type
+ * create or update case type
*
* @param array $params input parameters
*
}
/**
- * Function to retrieve case types
+ * retrieve case types
*
- * @param $params
+ * @param array $params
*
* @return array $caseTypes case types keyed by id
* @access public
*/
function civicrm_api3_case_type_get($params) {
- civicrm_api3_verify_mandatory($params);
+ if (!empty($params['options']) && !empty($params['options']['is_count'])) {
+ return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
+ }
$caseTypes = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
-
// format case type, to fetch xml definition
return _civicrm_api3_case_type_get_formatResult($caseTypes);
}
/**
- * Function to format definition
+ * format definition
*
* @param $caseTypes
* @return mixed