|
| | init () |
| |
| | checkPermission ($gperm_name, $gperm_itemid, $trueifadmin=true) |
| |
| | checkPermissionRedirect ( $gperm_name, $gperm_itemid, $url, $time=3, $message='', $trueifadmin=true) |
| |
| | getGroupsForItem ($gperm_name, $gperm_itemid) |
| |
| | savePermissionForItem ($gperm_name, $gperm_itemid, $groups) |
| |
| | deletePermissionForItem ($gperm_name, $gperm_itemid) |
| |
| | getGroupSelectFormForItem ( $gperm_name, $gperm_itemid, $caption, $name=null, $include_anon=false, $size=5, $multiple=true) |
| |
| | defaultFieldName ($gperm_name, $gperm_itemid) |
| |
| | __construct ($dirname=null) |
| |
| | dirname () |
| |
| | setDebug ($bool=true) |
| |
| | addLog ($log) |
| |
◆ checkPermission()
| checkPermission |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid, |
|
|
|
$trueifadmin = true |
|
) |
| |
Check if the user has permission for an item
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
| bool | $trueifadmin | true to always return true for admin groups |
- Renvoie
- bool true if user has access, false if not
◆ checkPermissionRedirect()
| checkPermissionRedirect |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid, |
|
|
|
$url, |
|
|
|
$time = 3, |
|
|
|
$message = '', |
|
|
|
$trueifadmin = true |
|
) |
| |
Redirect to a url if user does not have permission for an item
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
| string | $url | module relative url to redirect to |
| int | $time | time in seconds to delay |
| string | $message | message to display with redirect |
| bool | $trueifadmin | true to always return true for admin groups |
- Renvoie
- void
◆ defaultFieldName()
| defaultFieldName |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid |
|
) |
| |
Generate a default name for a XoopsFormElement based on module, gperm_name and gperm_itemid
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
- Renvoie
- string
◆ deletePermissionForItem()
| deletePermissionForItem |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid |
|
) |
| |
Delete all permissions for an item and a specific name or array of names
- Paramètres
-
| string | string[] | $gperm_name | name(s) of the permission to delete |
| int | $gperm_itemid | id of the object to check |
- Renvoie
- bool true if no errors
◆ getGroupSelectFormForItem()
| getGroupSelectFormForItem |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid, |
|
|
|
$caption, |
|
|
|
$name = null, |
|
|
|
$include_anon = false, |
|
|
|
$size = 5, |
|
|
|
$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.
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
| string | $caption | caption for form field |
| string | $name | name/id of form field |
| bool | $include_anon | true to include anonymous group |
| int | $size | size of list |
| bool | $multiple | true to allow multiple selections |
- Renvoie
- object XoopsFormSelectGroup
◆ getGroupsForItem()
| getGroupsForItem |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid |
|
) |
| |
Get array of groups with named permission to an item
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
- Renvoie
- array groups with permission for item
◆ getUserGroups()
Get any groups associated with the current user
- Renvoie
- int|int[] group id(s)
◆ init()
Initialize parent::__construct calls this after verifying module object.
- Renvoie
- void
Réimplémentée à partir de AbstractHelper.
◆ savePermissionForItem()
| savePermissionForItem |
( |
|
$gperm_name, |
|
|
|
$gperm_itemid, |
|
|
|
$groups |
|
) |
| |
Save group permissions for an item
- Paramètres
-
| string | $gperm_name | name of the permission to test |
| int | $gperm_itemid | id of the object to check |
| array | $groups | group ids to grant permission to |
- Renvoie
- bool true if no errors
◆ $dirname
◆ $mid
◆ $permissionHandler
La documentation de cette classe a été générée à partir du fichier suivant :
- XoopsCore25-2.5.11-Beta1/htdocs/class/libraries/vendor/xoops/xmf/src/Module/Helper/Permission.php