Merge pull request #6500 from LevityNL/master
[civicrm-core.git] / api / v3 / ActivityType.php
index ebcc8b040ce2988d54073d6d388bc7fbde6b9676..ff5dafc94247c54af9e9bd38255403699ad10e4c 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -26,7 +26,7 @@
  */
 
 /**
- * The activity_type api is deprecated. Please use the option_value api instead.
+ * The ActivityType api is deprecated. Please use the OptionValue api instead.
  *
  * @deprecated
  *
@@ -41,7 +41,7 @@
  *   to indicate this entire api entity is deprecated
  */
 function _civicrm_api3_activity_type_deprecation() {
-  return 'The activity_type api is deprecated. Please use the option_value api instead.';
+  return 'The ActivityType api is deprecated. Please use the OptionValue api instead.';
 }
 
 /**
@@ -51,7 +51,7 @@ function _civicrm_api3_activity_type_deprecation() {
  *
  * @return array
  *   activity types keyed by id
- * @deprecated - use getoptions
+ * @deprecated - use the getoptions action instead
  */
 function civicrm_api3_activity_type_get($params) {
 
@@ -67,7 +67,7 @@ function civicrm_api3_activity_type_get($params) {
  * @return array
  *   created / updated activity type
  *
- * @deprecated use option_value api
+ * @deprecated use the OptionValue api instead
  */
 function civicrm_api3_activity_type_create($params) {
 
@@ -93,14 +93,20 @@ function civicrm_api3_activity_type_create($params) {
  *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_activity_type_create_spec(&$params) {
-  $params['label']['api.required'] = 1;
-  $params['label']['title'] = 'Label';
-  $params['weight']['api.required'] = 1;
-  $params['weight']['title'] = 'Weight';
+  $params['label'] = array(
+    'api.required' => 1,
+    'title' => 'Label',
+    'type' => CRM_Utils_Type::T_STRING,
+  );
+  $params['weight'] = array(
+    'api.required' => 1,
+    'title' => 'Weight',
+    'type' => CRM_Utils_Type::T_STRING,
+  );
 }
 
 /**
- * Delete activity type.
+ * Delete ActivityType.
  *
  * @param array $params
  *   Array including id of activity_type to delete.
@@ -108,7 +114,7 @@ function _civicrm_api3_activity_type_create_spec(&$params) {
  * @return array
  *   API result array
  *
- * @deprecated use option_value api
+ * @deprecated use OptionValue api
  */
 function civicrm_api3_activity_type_delete($params) {
   return civicrm_api3_create_success(CRM_Core_BAO_OptionValue::del($params['id']), $params);