diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-07 12:01:48 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-07 12:01:48 +0000 |
commit | f6dd53c8f37043422dc5fbdebeba7817ccf96e73 (patch) | |
tree | 4f3798a79019a466e8ae05c70bfa691b654f1d13 | |
parent | 64c857f17989ab38fb8551cd779275966bd2effe (diff) | |
download | elgg-f6dd53c8f37043422dc5fbdebeba7817ccf96e73.tar.gz elgg-f6dd53c8f37043422dc5fbdebeba7817ccf96e73.tar.bz2 |
Fixes #122
git-svn-id: https://code.elgg.org/elgg/trunk@1309 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/objects.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/objects.php b/engine/lib/objects.php index 5cccccc72..f14becf40 100644 --- a/engine/lib/objects.php +++ b/engine/lib/objects.php @@ -195,6 +195,21 @@ { return $this->get('container_guid'); } + + /** + * As getContainer(), but returns the whole entity. + * + * @return mixed ElggGroup object or false. + */ + function getContainerEntity() + { + $result = get_entity($this->getContainer()); + + if (($result) && ($result instanceof ElggGroup)) + return $result; + + return false; + } /**
* Get the collections associated with a object.
|