Class Permission
Methods to help manage permissions within a module
- Xmf\Module\Helper\AbstractHelper
- Xmf\Module\Helper\Permission
Namespace: Xmf\Module\Helper
Package: Xmf
Category: Xmf\Module\Helper\Permission
Copyright: 2011-2016 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
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/Permission.php
Package: Xmf
Category: Xmf\Module\Helper\Permission
Copyright: 2011-2016 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
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/Permission.php
public
|
|
public
boolean
|
#
checkPermission( string $gperm_name, integer $gperm_itemid, boolean $trueifadmin = true )
Check if the user has permission for an item |
public
|
#
checkPermissionRedirect( string $gperm_name, integer $gperm_itemid, string $url, integer $time = 3, string $message = '', boolean $trueifadmin = true )
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|string[] $gperm_name, integer $gperm_itemid )
Delete all permissions for an item and a specific name or array of names |
public
object
|
#
getGroupSelectFormForItem( string $gperm_name, integer $gperm_itemid, string $caption, string $name = null, boolean $include_anon = false, integer $size = 5, boolean $multiple = true )
Generate a XoopsFormElement 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 XoopsFormElement based on module, gperm_name and gperm_itemid |
protected
integer|int[]
|
__construct(),
addLog(),
setDebug()
|
protected
integer
|
$mid
|
|
protected
string
|
$dirname
|
|
protected
XoopsGrouppermHandler
|
$permissionHandler
|
$debug,
$module
|