<?php
-// $Id$
/*
+--------------------------------------------------------------------+
}
return civicrm_api3_create_success($result, $params);
}
-/*
+
+/**
* Adjust Metadata for Get action
*
* The metadata is used for setting defaults, documentation & validation
$params['entity_table']['api.default'] = 'civicrm_contact';
}
-/**
- *
- * @param <type> $params
- *
- * @return <type>
- * @todo EM 7 Jan 2011 - believe this should be deleted
- * @deprecated
- */
-function civicrm_api3_entity_tag_display($params) {
-
- civicrm_api3_verify_one_mandatory($params, NULL, array('entity_id', 'contact_id'));
-
- $entityID = NULL;
- $entityTable = 'civicrm_contact';
-
- if (!($entityID = CRM_Utils_Array::value('entity_id', $params))) {
- $entityID = CRM_Utils_Array::value('contact_id', $params);
- }
-
-
- if (CRM_Utils_Array::value('entity_table', $params)) {
- $entityTable = $params['entity_table'];
- }
-
- $values = CRM_Core_BAO_EntityTag::getTag($entityID, $entityTable);
- $result = array();
- $tags = CRM_Core_PseudoConstant::tag();
- foreach ($values as $v) {
- $result[] = $tags[$v];
- }
- return implode(',', $result);
-}
-
/**
*
* @param array $params
* @example EntityTagCreate.php
*/
function civicrm_api3_entity_tag_create($params) {
-
-
return _civicrm_api3_entity_tag_common($params, 'add');
}
return _civicrm_api3_entity_tag_common($params, 'remove');
}
-/*
+
+/**
* modify metadata
*/
function _civicrm_api3_entity_tag_delete_spec(&$params) {