diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 17:40:41 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 17:40:41 +0000 |
commit | f1ad194e108957db88953125403cfc21c790ad95 (patch) | |
tree | c870521dc59410b6dc95390483f4d361be4dac49 /engine/lib/entities.php | |
parent | 57c3924bea24d45c85f219e8733d45aa0dac9b17 (diff) | |
download | elgg-f1ad194e108957db88953125403cfc21c790ad95.tar.gz elgg-f1ad194e108957db88953125403cfc21c790ad95.tar.bz2 |
Fixes #1376: added ElggEntity::removeRelationship().
git-svn-id: http://code.elgg.org/elgg/trunk@3889 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 12 |
1 files changed, 12 insertions, 0 deletions
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,12 +416,24 @@ 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. * * @param $name |