Skip to content

Commit

Permalink
fix: Adding missing method getRelatedFields
Browse files Browse the repository at this point in the history
getRelatedFields is missing in Link2 while was there on Link.php and is used by the old API and solves salesagility#3510
  • Loading branch information
mrbarletta committed Feb 24, 2018
1 parent 19cfd69 commit 6ba6aea
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion data/Link2.php
Expand Up @@ -253,11 +253,19 @@ public function getFocus()
return $this->focus;
}

/**
* @return Array of related fields
*/
function getRelatedFields(){
return $this->relationship_fields;
}

/**
* @param $name
*
* @return string The value for the relationship field $name
*/

public function getRelatedField($name)
{
if (!empty($this->relationship_fields) && !empty($this->relationship_fields[$name])) {
Expand All @@ -266,7 +274,7 @@ public function getRelatedField($name)
return null;
} //For now return null. Later try the relationship object directly.
}

/**
* @return SugarRelationship the relationship object this link references
*/
Expand Down

0 comments on commit 6ba6aea

Please sign in to comment.