XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsGroupPermHandler Class Reference
Inheritance diagram for XoopsGroupPermHandler:
Inheritance graph

Public Member Functions

 addRight ($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid=1)
 
 checkRight ($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid=1, $trueifadmin=true)
 
create ($isNew=true)
 
 delete (&$perm)
 
 deleteAll ($criteria=null)
 
 deleteByGroup ($gperm_groupid, $gperm_modid=null)
 
 deleteByModule ($gperm_modid, $gperm_name=null, $gperm_itemid=null)
 
get ($id)
 
 getCount ($criteria=null)
 
 getGroupIds ($gperm_name, $gperm_itemid, $gperm_modid=1)
 
 getItemIds ($gperm_name, $gperm_groupid, $gperm_modid=1)
 
 getObjects ($criteria=null, $id_as_key=false)
 
 insert (&$perm)
 
- Public Member Functions inherited from XoopsObjectHandler
create ()
 
 delete (&$object)
 
get ($int_id)
 
 insert (&$object)
 
 XoopsObjectHandler (&$db)
 

Additional Inherited Members

- Public Attributes inherited from XoopsObjectHandler
 $db
 

Detailed Description

XOOPS group permission handler class.

This class is responsible for providing data access mechanisms to the data source of XOOPS group permission class objects. This class is an abstract class to be implemented by child group permission classes.

See Also
XoopsGroupPerm
Author
Kazumi Ono onoka.nosp@m.zu@x.nosp@m.oops..nosp@m.org

Definition at line 108 of file groupperm.php.

Member Function Documentation

XoopsGroupPermHandler::addRight (   $gperm_name,
  $gperm_itemid,
  $gperm_groupid,
  $gperm_modid = 1 
)

Add a permission

Parameters
string$gperm_nameName of permission
int$gperm_itemidID of an item
int$gperm_groupidID of a group
int$gperm_modidID of a module
Returns
bool TRUE if success

Definition at line 376 of file groupperm.php.

References XoopsObjectHandler\create(), and insert().

Here is the call graph for this function:

XoopsGroupPermHandler::checkRight (   $gperm_name,
  $gperm_itemid,
  $gperm_groupid,
  $gperm_modid = 1,
  $trueifadmin = true 
)

Check permission

Parameters
string$gperm_nameName of permission
int$gperm_itemidID of an item
int/array$gperm_groupid A group ID or an array of group IDs
int$gperm_modidID of a module
bool$trueifadminReturns true for admin groups
Returns
bool TRUE if permission is enabled

Definition at line 335 of file groupperm.php.

References $criteria, and getCount().

Here is the call graph for this function:

& XoopsGroupPermHandler::create (   $isNew = true)

Create a new XoopsGroupPerm

Returns
bool $isNew Flag the object as "new"?

Definition at line 115 of file groupperm.php.

XoopsGroupPermHandler::delete ( $perm)

Delete a XoopsGroupPerm

Parameters
object&$perm
Returns
bool TRUE on success

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 196 of file groupperm.php.

References $result, and $sql.

XoopsGroupPermHandler::deleteAll (   $criteria = null)

Delete all permissions by a certain criteria

Parameters
object$criteriaCriteriaElement
Returns
bool TRUE on success

Definition at line 274 of file groupperm.php.

References $criteria, $result, and $sql.

Referenced by deleteByGroup(), and deleteByModule().

Here is the caller graph for this function:

XoopsGroupPermHandler::deleteByGroup (   $gperm_groupid,
  $gperm_modid = null 
)

Delete all module specific permissions assigned for a group

Parameters
int$gperm_groupidID of a group
int$gperm_modidID of a module
Returns
bool TRUE on success

Definition at line 294 of file groupperm.php.

References $criteria, and deleteAll().

Here is the call graph for this function:

XoopsGroupPermHandler::deleteByModule (   $gperm_modid,
  $gperm_name = null,
  $gperm_itemid = null 
)

Delete all module specific permissions

Parameters
int$gperm_modidID of a module
string$gperm_nameName of a module permission
int$gperm_itemidID of a module item
Returns
bool TRUE on success

Definition at line 312 of file groupperm.php.

References $criteria, and deleteAll().

Here is the call graph for this function:

& XoopsGroupPermHandler::get (   $id)

Retrieve a group permission

Parameters
int$idID
Returns
object XoopsGroupPerm, FALSE on fail

Definition at line 131 of file groupperm.php.

References $result, and $sql.

XoopsGroupPermHandler::getCount (   $criteria = null)

Count some XoopsGroupPerms

Parameters
object$criteriaCriteriaElement
Returns
int

Definition at line 253 of file groupperm.php.

References $criteria, $result, and $sql.

Referenced by checkRight().

Here is the caller graph for this function:

XoopsGroupPermHandler::getGroupIds (   $gperm_name,
  $gperm_itemid,
  $gperm_modid = 1 
)

Get all group IDs assigned a specific permission for a particular item

Parameters
string$gperm_nameName of permission
int$gperm_itemidID of an item
int$gperm_modidID of a module
Returns
array array of group IDs

Definition at line 425 of file groupperm.php.

References $criteria, $i, $ret, and getObjects().

Here is the call graph for this function:

XoopsGroupPermHandler::getItemIds (   $gperm_name,
  $gperm_groupid,
  $gperm_modid = 1 
)

Get all item IDs that a group is assigned a specific permission

Parameters
string$gperm_nameName of permission
int/array$gperm_groupid A group ID or an array of group IDs
int$gperm_modidID of a module
Returns
array array of item IDs

Definition at line 395 of file groupperm.php.

References $criteria, $criteria2, $i, $ret, and getObjects().

Here is the call graph for this function:

XoopsGroupPermHandler::getObjects (   $criteria = null,
  $id_as_key = false 
)

Retrieve multiple XoopsGroupPerms

Parameters
object$criteriaCriteriaElement
bool$id_as_keyUse IDs as array keys?
Returns
array Array of XoopsGroupPerms

Definition at line 219 of file groupperm.php.

References $criteria, $limit, $result, $ret, $sql, and $start.

Referenced by getGroupIds(), and getItemIds().

Here is the caller graph for this function:

XoopsGroupPermHandler::insert ( $perm)

Store a XoopsGroupPerm

Parameters
object&$permXoopsGroupPerm object
Returns
bool TRUE on success

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 156 of file groupperm.php.

References $result, and $sql.

Referenced by addRight().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: