aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-05 20:28:03 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-05 20:28:03 +0000
commit5f21a1424045084e35a50e630ecc012c06eb933e (patch)
treedb000772279dd9c7b969a6479a451cbd3a4d443a /engine
parentab9c7b68bf6cc73c61f5a3cba6a48438cf7ca7a6 (diff)
downloadelgg-5f21a1424045084e35a50e630ecc012c06eb933e.tar.gz
elgg-5f21a1424045084e35a50e630ecc012c06eb933e.tar.bz2
* Added addRelationship to ElggEntity... bit of an omission!
git-svn-id: https://code.elgg.org/elgg/trunk@2532 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php11
1 files changed, 11 insertions, 0 deletions
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) {