From f6dd53c8f37043422dc5fbdebeba7817ccf96e73 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 7 Jul 2008 12:01:48 +0000 Subject: Fixes #122 git-svn-id: https://code.elgg.org/elgg/trunk@1309 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/objects.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engine/lib/objects.php') 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. -- cgit v1.2.3