+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
function civicrm_api3_relationship_get($params) {
$options = _civicrm_api3_get_options_from_params($params);
function civicrm_api3_relationship_get($params) {
$options = _civicrm_api3_get_options_from_params($params);
if(!empty($params['membership_type_id']) && empty($params['relationship_type_id'])) {
CRM_Contact_BAO_Relationship::membershipTypeToRelationshipTypes($params);
}
if(!empty($params['membership_type_id']) && empty($params['relationship_type_id'])) {
CRM_Contact_BAO_Relationship::membershipTypeToRelationshipTypes($params);
}
_civicrm_api3_store_values($fields, $params, $values);
$relationTypes = CRM_Core_PseudoConstant::relationshipType('name');
_civicrm_api3_store_values($fields, $params, $values);
$relationTypes = CRM_Core_PseudoConstant::relationshipType('name');
$relation = new CRM_Contact_BAO_Relationship();
$relation->id = $params['id'];
if (!$relation->find(TRUE)) {
$relation = new CRM_Contact_BAO_Relationship();
$relation->id = $params['id'];
if (!$relation->find(TRUE)) {
$relationshipTypeId != $values['relationship_type_id']
) {
throw new Exception('Mismatched Relationship Type and Relationship Type Id');
$relationshipTypeId != $values['relationship_type_id']
) {
throw new Exception('Mismatched Relationship Type and Relationship Type Id');