Permalink
Browse files

MINOR update merge info, merged in r87119 (from r88839) (from r96714)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102337 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 603657b commit 1ed1348cf3064c35d5b58eb91161fe4a133cd4a8 @chillu chillu committed Apr 12, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 security/Group.php
View
13 security/Group.php
@@ -35,6 +35,19 @@ class Group extends DataObject {
"Hierarchy",
);
+ function getAllChildren() {
+ $doSet = new DataObjectSet();
+
+ if ($children = DataObject::get('Group', 'ParentID = '.$this->ID)) {
+ foreach($children as $child) {
+ $doSet->push($child);
+ $doSet->merge($child->getAllChildren());
+ }
+ }
+
+ return $doSet;
+ }
+
/**
* Caution: Only call on instances, not through a singleton.
*

0 comments on commit 1ed1348

Please sign in to comment.