XOOPS  2.6.0
XoopsGroupPermHandler Class Reference
Inheritance diagram for XoopsGroupPermHandler:
Inheritance graph

Public Member Functions

 __construct (Connection $db=null)
 
 addRight ($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid=1)
 
 checkRight ($gperm_name, $gperm_itemid, $gperm_groupid, $gperm_modid=1, $trueifadmin=true)
 
 deleteByGroup ($gperm_groupid, $gperm_modid=null)
 
 deleteByModule ($gperm_modid, $gperm_name=null, $gperm_itemid=null)
 
 getGroupIds ($gperm_name, $gperm_itemid, $gperm_modid=1)
 
 getItemIds ($gperm_name, $gperm_groupid, $gperm_modid=1)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 __call ($name, $args)
 
 cleanOrphan ($table_link= '', $field_link= '', $field_object= '')
 
 create ($isNew=true)
 
 delete (XoopsObject $object, $force=false)
 
 deleteAll (CriteriaElement $criteria, $force=true, $asObject=false)
 
 deleteByLink (CriteriaElement $criteria=null)
 
 get ($id=null, $fields=null)
 
 getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
 getByLink (CriteriaElement $criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null)
 
 getCount (CriteriaElement $criteria=null)
 
 getCountByLink (CriteriaElement $criteria=null)
 
 getCounts (CriteriaElement $criteria=null)
 
 getCountsByLink (CriteriaElement $criteria=null)
 
 getIds (CriteriaElement $criteria=null)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
 getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
 insert (XoopsObject $object, $force=true)
 
 loadHandler ($name, $args=null)
 
 setHandler ($handler=null, $args=null, $path=null)
 
 synchronization ($table_link= '', $field_link= '', $field_object= '')
 
 updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria, $force=false)
 
 updateByLink ($data, CriteriaElement $criteria=null)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 create ()
 
 delete (XoopsObject $object, $force=true)
 
 get ($int_id)
 
 insert (XoopsObject $object, $force=true)
 

Additional Inherited Members

- Public Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 $className
 
 $field_link
 
 $field_object
 
 $identifierName
 
 $keyName
 
 $keyName_link
 
 $table
 
 $table_link
 
- Public Attributes inherited from Xoops\Core\Kernel\XoopsObjectHandler
 $db2
 
- Protected Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 __construct (Connection $db=null, $table= '', $className= '', $keyName= '', $identifierName= '')
 
- Protected Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 __construct (Connection $db=null)
 
- Protected Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 $handler
 

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 118 of file groupperm.php.

Constructor & Destructor Documentation

XoopsGroupPermHandler::__construct ( Connection  $db = null)

Constructor

Parameters
Connection | null$dbConnection

Definition at line 125 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 222 of file groupperm.php.

References Xoops\Core\Kernel\XoopsObjectHandler\create(), and Xoops\Core\Kernel\XoopsPersistableObjectHandler\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_groupidA 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 179 of file groupperm.php.

References $criteria, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getCount().

Here is the call 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 138 of file groupperm.php.

References $criteria, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\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 156 of file groupperm.php.

References $criteria, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll().

Here is the call 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 271 of file groupperm.php.

References $criteria, $i, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\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_groupidA group ID or an array of group IDs
int$gperm_modidID of a module
Returns
array array of item IDs

Definition at line 241 of file groupperm.php.

References $criteria, $criteria2, $i, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getObjects().

Here is the call graph for this function:


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