Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

Group Class Reference

Inheritance diagram for Group:

Inheritance graph
[legend]
Collaboration diagram for Group:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Group ($idG)
 _UpdateModulesList ()
 GetId ()
 GetName ()
 IsGlobal ()
 SetGlobal ()
GetParent ()
 SetName ($name)
 Commit ()
GetUsers ()
 HasUser ($idU)
GetUsersWithPermission ($permission, $mod)
 AddUser ($idU, $idR)
 RemoveUser ($idU)
GetModules ()
 HasModule ($idM)
 GetModuleName ($idRmg)
 SetModuleName ($idRmg, $name)
 AddModule ($idM, $name="")
 RemoveModule ($idRMG)
GetSubgroups ()
GetSubgroupsOfUser ($idU)
AddSubgroup ($name)
Create ($name, $global=false, $parent=null)
 Remove ($idG)
 GetAllGroupsId ($parent=null, $global=null)

Public Attributes

 $data
 Stores an array with all DB fields for a specific group.

 $modules
 Stores an array with the modules of the group.


Detailed Description

Class that abstracts the access to groups information

Definition at line 13 of file Group.class.php.


Constructor & Destructor Documentation

Group::Group idG  ) 
 

Class constructor.

Creates a group object given its id.

Parameters:
idG The id of the group.

Definition at line 25 of file Group.class.php.

Referenced by Create().


Member Function Documentation

Group::_UpdateModulesList  ) 
 

Updates the list of modules that belongs to this group.

Definition at line 49 of file Group.class.php.

Group::AddModule idM,
name = ""
 

Adds a module to this group.

Parameters:
idM The identifier of the module.
name The screen name the module will have in this group.
Returns:
idRMG: The identifier of the module in the group.

Definition at line 403 of file Group.class.php.

References $module, $modules, Modules::GetInstance(), JSystem::IsError(), I18N::Language(), and JBaseObject::RaiseError().

& Group::AddSubgroup name  ) 
 

Adds a new subgroup to the current group.

Parameters:
name The name of the new subgroup.
Returns:
Group.

Definition at line 535 of file Group.class.php.

Group::AddUser idU,
idR
 

Adds a user to this group.

Parameters:
idU The id of the user.
idR The id of the role the user will have in the group.
Returns:
JError if there was any error

Definition at line 236 of file Group.class.php.

References JUgrSystem::GetInstance(), JSystem::IsError(), and JBaseObject::RaiseError().

Group::Commit  ) 
 

Stores all changes in the DB

Definition at line 132 of file Group.class.php.

& Group::Create name,
global = false,
parent = null
 

Static method that adds a new group in the system.

Parameters:
name The name of the group.
global Boolean indicating whether the group is global or not.
parent The parent group of the new one.
Returns:
Group.

Definition at line 551 of file Group.class.php.

References JUgrSystem::GetInstance(), JSystem::GetLastError(), Group(), JSystem::IsError(), and JBaseObject::RaiseError().

Referenced by JUgrSystem::AddGroup().

Group::GetAllGroupsId parent = null,
global = null
 

Gets a DBJames object with all the identifiers of the groups.

Parameters:
parent The id of the parent group, 0 for groups who have no parent, null for all groups.
global Whether the group must be a global group or not. null for all groups.
Returns:
DBJames

Definition at line 636 of file Group.class.php.

Referenced by JUgrSystem::_RefreshGroups(), and JUgrSystem::GetGroups().

Group::GetId  ) 
 

Gets the group identifier.

Returns:
integer

Definition at line 76 of file Group.class.php.

Group::GetModuleName idRmg  ) 
 

Gets the name of the module in the group given its idRmg

Parameters:
idRmg The identifier of the module in the group.
Returns:
string

Definition at line 357 of file Group.class.php.

& Group::GetModules  ) 
 

Gets an array with all modules availables for this group.

The array is indexed by idRMG, that is the value that identifies a module in a group (it is possible to have the same module twice or more times in the same group).

Returns:
Array of Module (indexed by idRMG).

Definition at line 305 of file Group.class.php.

References $modules, Modules::GetInstance(), and JBaseObject::RaiseError().

Group::GetName  ) 
 

Gets the name of the group.

Returns:
string

Definition at line 85 of file Group.class.php.

& Group::GetParent  ) 
 

Gets the parent group.

Returns:
Group.

Definition at line 111 of file Group.class.php.

References JUgrSystem::GetInstance().

& Group::GetSubgroups  ) 
 

Gets an array with all subgroups of this group.

Returns:
Array of Group

Definition at line 466 of file Group.class.php.

References JUgrSystem::GetInstance(), and JBaseObject::RaiseError().

& Group::GetSubgroupsOfUser idU  ) 
 

Gets an array with all subgroups of this group that a certain user belongs to.

Parameters:
idU The id of the user.
Returns:
Array of Group

Definition at line 499 of file Group.class.php.

References JUgrSystem::GetInstance(), and JBaseObject::RaiseError().

& Group::GetUsers  ) 
 

Gets a DBJames object with all users in the group.

Returns:
DBJames object.

Definition at line 160 of file Group.class.php.

References JBaseObject::RaiseError().

& Group::GetUsersWithPermission permission,
mod
 

Gets a DBJames object with all users in the group that has a certain permission for a module.

Parameters:
permission The name of the permission
mod The id of the module
Returns:
DBJames object.

Definition at line 208 of file Group.class.php.

References JBaseObject::RaiseError().

Group::HasModule idM  ) 
 

Checks whether a module is in a group or not.

Parameters:
idM The identifier of the module.
Returns:
boolean

Definition at line 330 of file Group.class.php.

References JBaseObject::RaiseError().

Group::HasUser idU  ) 
 

Checks if an user belongs to this group.

Parameters:
idU The user id.
Returns:
boolean

Definition at line 183 of file Group.class.php.

Group::IsGlobal  ) 
 

Gets whether the group is global or not

Returns:
boolean

Definition at line 94 of file Group.class.php.

Group::Remove idG  ) 
 

Static method that removes a group from the system.

Parameters:
idG The id of the group.

Definition at line 593 of file Group.class.php.

References JUgrSystem::GetInstance(), JSystem::IsError(), and JBaseObject::RaiseError().

Referenced by JUgrSystem::RemoveGroup().

Group::RemoveModule idRMG  ) 
 

Removes a module from the group.

Parameters:
idRMG The module identifier in the group.

Definition at line 447 of file Group.class.php.

Group::RemoveUser idU  ) 
 

Removes the specified user from the group.

Parameters:
idU The user id.

Definition at line 275 of file Group.class.php.

References JBaseObject::RaiseError().

Group::SetGlobal  ) 
 

Sets a group as global

Definition at line 102 of file Group.class.php.

Group::SetModuleName idRmg,
name
 

Sets the name of the module in the group given its idRmg

Parameters:
idRmg The identifier of the module in the group.
name The new name of the module in the group

Definition at line 367 of file Group.class.php.

References $module, $modules, Modules::GetInstance(), and I18N::Language().

Group::SetName name  ) 
 

Sets the name of the group.

The changes will not be stored in the DB until the Commit method is executed.

Parameters:
name The new name of the group.

Definition at line 124 of file Group.class.php.


Member Data Documentation

Group::$data
 

Stores an array with all DB fields for a specific group.

Definition at line 15 of file Group.class.php.

Group::$modules
 

Stores an array with the modules of the group.

Definition at line 16 of file Group.class.php.

Referenced by AddModule(), GetModules(), and SetModuleName().


The documentation for this class was generated from the following file:
Generated on Wed Nov 19 20:29:36 2003 for James by doxygen 1.3.4