API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsGroupPermHandler Class Reference
Inheritance diagram for XoopsGroupPermHandler:
Collaboration diagram for XoopsGroupPermHandler:

Public Member Functions

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

Data Fields

 $table
 
- Data Fields 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

Constructor & Destructor Documentation

◆ __construct()

__construct ( XoopsDatabase  $db)

called from child classes only

Parameters
XoopsDatabase$dbreference to the XoopsDatabase object @access protected

Reimplemented from XoopsObjectHandler.

Member Function Documentation

◆ addRight()

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
Here is the call graph for this function:

◆ checkRight()

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
Here is the call graph for this function:

◆ create()

create (   $isNew = true)

Create a new XoopsGroupPerm

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

◆ delete()

delete ( XoopsObject  $perm)

Delete a XoopsGroupPerm

Parameters
XoopsObject | XoopsGroupPerm$perma XoopsGroupPerm object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

◆ deleteAll()

deleteAll ( CriteriaElement  $criteria = null)

Delete all permissions by a certain criteria

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
Returns
bool TRUE on success
Here is the caller graph for this function:

◆ deleteByGroup()

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
Here is the call graph for this function:

◆ deleteByModule()

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
Here is the call graph for this function:

◆ get()

get (   $id)

Retrieve a group permission

Parameters
int$idID
Returns
XoopsGroupPerm XoopsGroupPerm, FALSE on fail

Reimplemented from XoopsObjectHandler.

◆ getCount()

getCount ( CriteriaElement  $criteria = null)

Count some XoopsGroupPerms

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
Returns
int
Here is the caller graph for this function:

◆ getGroupIds()

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
Here is the call graph for this function:

◆ getItemIds()

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
Here is the call graph for this function:

◆ getObjects()

getObjects ( CriteriaElement  $criteria = null,
  $id_as_key = false 
)

Retrieve multiple XoopsGroupPerms

Parameters
CriteriaElement | CriteriaCompo$criteriaCriteriaElement
bool$id_as_keyUse IDs as array keys?
Returns
array Array of XoopsGroupPerms
Here is the caller graph for this function:

◆ insert()

insert ( XoopsObject  $perm)

Store a XoopsGroupPerm

Parameters
XoopsObject | XoopsGroupPerm$perma XoopsGroupPerm object
Returns
bool true on success, otherwise false

Reimplemented from XoopsObjectHandler.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ $table

$table

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