INFRA-132 - Batch 14 (g)
[civicrm-core.git] / api / v3 / UFField.php
index 13652074dffc0515f4c86761c5881cf22d27e8df..7027417cdf0a5f4e3cc75d4cc64a2dd02275a773 100644 (file)
@@ -1,8 +1,7 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
 /**
  * Defines 'uf field' within a group.
  *
- * @param $params  array  Associative array of property name/value pairs to create new uf field.
+ * @param array $params
+ *   Array Associative array of property name/value pairs to create new uf field.
  *
  * @throws API_Exception
  *
- * @return array Newly created $ufFieldArray
- *
- * @access public
- * {@getfields UFField_create}
- * @example UFFieldCreate.php
+ * @return array
+ *   Newly created $ufFieldArray
  */
 function civicrm_api3_uf_field_create($params) {
   civicrm_api3_verify_one_mandatory($params, NULL, array('field_name', 'uf_group_id'));
@@ -113,7 +110,8 @@ function civicrm_api3_uf_field_create($params) {
  *
  * @param array $params
  *
- * @return array fields valid for other functions
+ * @return array
+ *   fields valid for other functions
  */
 function _civicrm_api3_uf_field_create_spec(&$params) {
   $params['option.autoweight'] = array(
@@ -129,14 +127,15 @@ function _civicrm_api3_uf_field_create_spec(&$params) {
 /**
  * Returns array of uf groups (profiles)  matching a set of one or more group properties
  *
- * @param array $params  (reference) Array of one or more valid
+ * @param array $params
+ *   (reference) Array of one or more valid.
  *                       property_name=>value pairs. If $params is set
  *                       as null, all surveys will be returned
  *
- * @return array  (reference) Array
+ * @return array
+ *   (reference) Array
  * {@getfields UFField_get
  * @example UFFieldGet.php
- * @access public
  */
 function civicrm_api3_uf_field_get($params) {
   return _civicrm_api3_basic_get('CRM_Core_BAO_UFField', $params);
@@ -149,11 +148,7 @@ function civicrm_api3_uf_field_get($params) {
  *
  * @throws API_Exception
  *
- * @return true on successful delete or return error
- *
- * @access public
- * {@getfields UFField_delete}
- * @example UFFieldDelete.php
+ * @return array
  */
 function civicrm_api3_uf_field_delete($params) {
   $fieldId = $params['id'];
@@ -170,11 +165,12 @@ function civicrm_api3_uf_field_delete($params) {
 
   return civicrm_api3_create_success($result, $params);
 }
+
 /**
  * field id accepted for backward compatibility - unset required on id
+ * @param array $params
  */
 function _civicrm_api3_uf_field_delete_spec(&$params) {
   // legacy support for field_id
   $params['id']['api.aliases'] = array('field_id');
 }
-