diff options
Diffstat (limited to 'engine/lib')
-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.
|