XOOPS
2.6.0
|
Public Member Functions | |
checkPermission ($gperm_name, $gperm_itemid) | |
checkPermissionRedirect ($gperm_name, $gperm_itemid, $url, $time=3, $message= '') | |
defaultFieldName ($gperm_name, $gperm_itemid) | |
deletePermissionForItem ($gperm_name, $gperm_itemid) | |
getGroupSelectFormForItem ($gperm_name, $gperm_itemid, $caption, $name=null, $include_anon=false, $size=5, $multiple=true) | |
getGroupsForItem ($gperm_name, $gperm_itemid) | |
init () | |
savePermissionForItem ($gperm_name, $gperm_itemid, $groups) | |
Public Member Functions inherited from Xmf\Module\Helper\AbstractHelper | |
__construct ($module=null) | |
addLog ($log) | |
init () | |
setDebug ($bool=true) | |
Private Attributes | |
$db | |
$dirname | |
$mid | |
$perm | |
$xoops = null | |
Additional Inherited Members | |
Protected Attributes inherited from Xmf\Module\Helper\AbstractHelper | |
$debug | |
$module | |
Definition at line 31 of file Permission.php.
Xmf\Module\Permission::checkPermission | ( | $gperm_name, | |
$gperm_itemid | |||
) |
Check if the user has permission for an item
string | $gperm_name | name of the permission to test |
int | $gperm_itemid | id of the object to check |
Definition at line 85 of file Permission.php.
Xmf\Module\Permission::checkPermissionRedirect | ( | $gperm_name, | |
$gperm_itemid, | |||
$url, | |||
$time = 3 , |
|||
$message = '' |
|||
) |
Redirect to a url if user does not have permission for an item
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 |
Definition at line 108 of file Permission.php.
References $helper, $url, and Xmf\Module\Helper\getHelper().
Xmf\Module\Permission::defaultFieldName | ( | $gperm_name, | |
$gperm_itemid | |||
) |
Generate a default name for a Xoops based on module, gperm_name and gperm_itemid
string | $gperm_name | name of the permission to test |
int | $gperm_itemid | id of the object to check |
Definition at line 235 of file Permission.php.
References $name.
Referenced by Xmf\Module\Permission\getGroupSelectFormForItem().
Xmf\Module\Permission::deletePermissionForItem | ( | $gperm_name, | |
$gperm_itemid | |||
) |
Delete all permissions for a specific name and item
string | $gperm_name | name of the permission to test |
int | $gperm_itemid | id of the object to check |
Definition at line 180 of file Permission.php.
Referenced by Xmf\Module\Permission\savePermissionForItem().
Xmf\Module\Permission::getGroupSelectFormForItem | ( | $gperm_name, | |
$gperm_itemid, | |||
$caption, | |||
$name = null , |
|||
$include_anon = false , |
|||
$size = 5 , |
|||
$multiple = true |
|||
) |
Generate a to select groups to grant permission to a specific gperm_name and gperm_item. Field will be preset with existing permissions.
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 annonymous group |
int | $size | size of list |
bool | $multiple | true to allow multiple selections |
Definition at line 200 of file Permission.php.
References $name, Xmf\Module\Permission\defaultFieldName(), and Xmf\Module\Permission\getGroupsForItem().
Xmf\Module\Permission::getGroupsForItem | ( | $gperm_name, | |
$gperm_itemid | |||
) |
Get array of groups with named permission to an item
string | $gperm_name | name of the permission to test |
int | $gperm_itemid | id of the object to check |
Definition at line 136 of file Permission.php.
Referenced by Xmf\Module\Permission\getGroupSelectFormForItem().
Xmf\Module\Permission::init | ( | ) |
Initialize parent::__constuct calls this after verifying module object.
Definition at line 63 of file Permission.php.
References XoopsBaseConfig\get(), Xoops\Core\Database\Factory\getConnection(), Xoops\getInstance(), and Xmf\Loader\loadFile().
Xmf\Module\Permission::savePermissionForItem | ( | $gperm_name, | |
$gperm_itemid, | |||
$groups | |||
) |
Save group permissions for an item
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 |
Definition at line 150 of file Permission.php.
References $groups, $result, and Xmf\Module\Permission\deletePermissionForItem().
|
private |
Definition at line 46 of file Permission.php.
|
private |
Definition at line 41 of file Permission.php.
|
private |
Definition at line 36 of file Permission.php.
|
private |
Definition at line 51 of file Permission.php.
|
private |
Definition at line 56 of file Permission.php.