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(); } }
private function collectChildRoleIdentifier(NsmRole $role, array &$store = array()) { foreach ($role->getChildren() as $child) { $this->collectChildRoleIdentifier($child, $store); $store[] = $child->role_id; } }