From 5f21a1424045084e35a50e630ecc012c06eb933e Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 5 Jan 2009 20:28:03 +0000 Subject: * Added addRelationship to ElggEntity... bit of an omission! git-svn-id: https://code.elgg.org/elgg/trunk@2532 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 43bb4a710..1e48ff508 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -316,6 +316,17 @@ remove_entity_relationships($this->getGUID()); remove_entity_relationships($this->getGUID(),"",true); return true; + } + + /** + * Add a relationship. + * + * @param int $guid Relationship to link to. + * @param string $relationship The type of relationship. + */ + public function addRelationship($guid, $relationship) + { + return add_entity_relationship($this->getGUID(), $relationship, $guid); } function setPrivateSetting($name, $value) { -- cgit v1.2.3