Merge pull request #6595 from eileenmcnaughton/CRM-16996
[civicrm-core.git] / api / v3 / Tag.php
index 06c5f18851490cf890dc8dd8f14cbbe3c80efba6..30b407d9b731b1eb4439494bda9936acd6fe3f1c 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.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 tag functions
+ * This api exposes CiviCRM tags.
  *
- * @package CiviCRM_APIv3
- * @subpackage API_Tag
+ * Tags are used to classify CRM entities (including Contacts, Groups and Actions).
+ *
+ * @note this api is for working with tags themselves. To add/remove tags from
+ * a contact or other entity, use the EntityTag api.
  *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: Tag.php 30486 2010-11-02 16:12:09Z shot $
+ * @package CiviCRM_APIv3
  */
 
 /**
- *  Add a Tag. Tags are used to classify CRM entities (including Contacts, Groups and Actions).
+ * Create or update a tag.
  *
- * Allowed @params array keys are:
- *
- * {@example TagCreate.php}
+ * Tags are used to classify CRM entities (including Contacts, Groups and Actions).
  *
  * @param array $params
+ *   Array per getfields metadata.
  *
  * @return array
- *   Array of newly created tag property values.
- *   {@getfields tag_create}
+ *   API result array
  */
 function civicrm_api3_tag_create($params) {
   return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
 
 /**
- * Specify Meta data for create. Note that this data is retrievable via the getfields function
+ * Specify Meta data for create.
+ *
+ * Note that this data is retrievable via the getfields function
  * and is used for pre-filling defaults and ensuring mandatory requirements are met.
  *
  * @param array $params
@@ -65,15 +66,12 @@ function _civicrm_api3_tag_create_spec(&$params) {
 }
 
 /**
- * Deletes an existing Tag
+ * Delete an existing Tag.
  *
  * @param array $params
  *
- * @example TagDelete.ph
- *
  * @return array
  *   API result array
- *   {@getfields tag_delete}
  */
 function civicrm_api3_tag_delete($params) {
   return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -85,14 +83,11 @@ function civicrm_api3_tag_delete($params) {
  * This api is used for finding an existing tag.
  * Either id or name of tag are required parameters for this api.
  *
- * @example TagGet.php
- *
  * @param array $params
- *   An associative array of name/value pairs.
+ *   Array per getfields metadata.
  *
  * @return array
- *   details of found tags else error
- *   {@getfields tag_get}
+ *   API result array
  */
 function civicrm_api3_tag_get($params) {