diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-31 20:34:59 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-31 20:34:59 +0000 |
commit | 7e54b4efb86eecf550c23aa21146d7e191a2da0e (patch) | |
tree | b42f576c445726ca66863fd59ba68f24f9686ed2 /engine/classes/ElggExtender.php | |
parent | 4426aedcb3b88226714a5bf5fc9f08c92d690c7c (diff) | |
download | elgg-7e54b4efb86eecf550c23aa21146d7e191a2da0e.tar.gz elgg-7e54b4efb86eecf550c23aa21146d7e191a2da0e.tar.bz2 |
Refs #2597: Pushed getOwner and getOwnerEntity into ElggEntity and ElggExtender
git-svn-id: http://code.elgg.org/elgg/trunk@7172 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggExtender.php')
-rw-r--r-- | engine/classes/ElggExtender.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/engine/classes/ElggExtender.php b/engine/classes/ElggExtender.php index 0379cc492..8d0f4bd66 100644 --- a/engine/classes/ElggExtender.php +++ b/engine/classes/ElggExtender.php @@ -80,6 +80,24 @@ abstract class ElggExtender extends ElggData } /** + * Return the guid of the entity's owner. + * + * @return int The owner GUID + */ + public function getOwner() { + return $this->owner_guid; + } + + /** + * Returns the ElggEntity or child object of the owner of the entity. + * + * @return ElggEntity The owning user + */ + public function getOwnerEntity() { + return get_entity($this->owner_guid); + } + + /** * Return the entity this describes. * * @return ElggEntity The enttiy |