CRM-15578 - Mailing.create API - Set defaults that match UX
[civicrm-core.git] / api / v3 / ContactType.php
index aaabf1972ebfac21ff37321175a794046694e477..6e4567493b064ec003a8d8d0d96e4a71ade4b578 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  */
 
 /**
- * File for the CiviCRM APIv3 group functions
+ * This api exposes CiviCRM contact types and sub-types.
+ *
+ * CiviCRM comes with 3 primary contact types - Individual, Organization & Household.
+ * Changing these is not advised, but sub_types can be created with this api.
+ * Pass 'parent_id' param to specify which base type a new sub_type extends.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Survey
- * @copyright CiviCRM LLC (c) 2004-2014
  */
 
 /**
- * create/update contact_type
+ * Create/update contact_type.
  *
  * This API is used to create new contact_type or update any of the existing
  * In case of updating existing contact_type, id of that particular contact_type must
  * be in $params array.
  *
  * @param array $params
- *   (reference) Associative array of property.
- *                       name/value pairs to insert in new 'contact_type'
+ *   Array per getfields metadata.
  *
  * @return array
  *   contact_type array
- *
- * @access public
  */
 function civicrm_api3_contact_type_create($params) {
   civicrm_api3_verify_mandatory($params, _civicrm_api3_get_DAO(__FUNCTION__), array('name', 'parent_id'));
@@ -67,16 +65,14 @@ function civicrm_api3_contact_type_create($params) {
 }
 
 /**
- * Returns array of contact_types  matching a set of one or more group properties
+ * Returns array of contact_types matching a set of one or more properties.
  *
  * @param array $params
- *   One or more valid.
- *                       property_name=>value pairs. If $params is set
- *                       as null, all contact_types will be returned
+ *   One or more valid property_name=>value pairs.
+ *   If $params is set as null, all contact_types will be returned
  *
  * @return array
  *   Array of matching contact_types
- * @access public
  */
 function civicrm_api3_contact_type_get($params) {
   civicrm_api3_verify_mandatory($params);
@@ -84,19 +80,16 @@ function civicrm_api3_contact_type_get($params) {
 }
 
 /**
- * delete an existing contact_type
+ * Delete an existing contact_type.
  *
  * This method is used to delete any existing contact_type. id of the group
  * to be deleted is required field in $params array
  *
  * @param array $params
- *   Array containing id of the group.
- *                       to be deleted
+ *   [id]
  *
  * @return array
  *   API Result Array
- *
- * @access public
  */
 function civicrm_api3_contact_type_delete($params) {
   return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);