From f1ad194e108957db88953125403cfc21c790ad95 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 1 Feb 2010 17:40:41 +0000 Subject: Fixes #1376: added ElggEntity::removeRelationship(). git-svn-id: http://code.elgg.org/elgg/trunk@3889 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engine') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 7d8a6b90a..3cabd93ca 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -416,11 +416,23 @@ abstract class ElggEntity implements * * @param int $guid Relationship to link to. * @param string $relationship The type of relationship. + * @return bool */ public function addRelationship($guid, $relationship) { return add_entity_relationship($this->getGUID(), $relationship, $guid); } + /** + * Remove a relationship + * + * @param int $guid + * @param str $relationship + * @return bool + */ + public function removeRelationship($guid, $relationship) { + return remove_entity_relationship($this->getGUID(), $relationship, $guid); + } + /** * Adds a private setting to this entity. * -- cgit v1.2.3