Class Permission
Methods to help manage permissions within a module
- Xmf\Module\Helper\AbstractHelper
- Xmf\Module\Permission
Namespace: Xmf\Module
Package: Xmf
Category: Xmf\Module\Helper\Permission
Copyright: 2011-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: trabis lusopoemas@gmail.com
Author: Richard Griffith richard@geekwright.com
Version: Release: 1.0
Since: 1.0
Link: http://xoops.org
Located at oops_lib/Xmf/Module/Permission.php
Package: Xmf
Category: Xmf\Module\Helper\Permission
Copyright: 2011-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: trabis lusopoemas@gmail.com
Author: Richard Griffith richard@geekwright.com
Version: Release: 1.0
Since: 1.0
Link: http://xoops.org
Located at oops_lib/Xmf/Module/Permission.php
public
|
|
public
boolean
|
#
checkPermission( string $gperm_name, integer $gperm_itemid )
Check if the user has permission for an item |
public
|
#
checkPermissionRedirect( string $gperm_name, integer $gperm_itemid, string $url, integer $time = 3, string $message = '' )
Redirect to a url if user does not have permission for an item |
public
array
|
#
getGroupsForItem( string $gperm_name, integer $gperm_itemid )
Get array of groups with named permission to an item |
public
boolean
|
#
savePermissionForItem( string $gperm_name, integer $gperm_itemid, array $groups )
Save group permissions for an item |
public
boolean
|
#
deletePermissionForItem( string $gperm_name, integer $gperm_itemid )
Delete all permissions for a specific name and item |
public
|
#
getGroupSelectFormForItem( string $gperm_name, integer $gperm_itemid, string $caption, string $name = null, boolean $include_anon = false, integer $size = 5, boolean $multiple = true )
Generate a \Xoops\Form\Element to select groups to grant permission to a specific gperm_name and gperm_item. Field will be preset with existing permissions. |
public
string
|
#
defaultFieldName( string $gperm_name, integer $gperm_itemid )
Generate a default name for a Xoops\Form\SelectGroup based on module, gperm_name and gperm_itemid |
__construct(),
addLog(),
setDebug()
|
$debug,
$module
|