public function rechainChildren(NsmRole &$role)
 {
     $parent = $role->hasParent() ? $role->getParent() : null;
     $children = $role->getChildren();
     foreach ($children as $child) {
         $child->set("role_parent", $parent);
         $child->save();
     }
 }
示例#2
0
 private function collectChildRoleIdentifier(NsmRole $role, array &$store = array())
 {
     foreach ($role->getChildren() as $child) {
         $this->collectChildRoleIdentifier($child, $store);
         $store[] = $child->role_id;
     }
 }