Class JAccessWrapperAccess
Wrapper class for JAccess
Methods summary
public
|
#
clearStatics( )
Helper wrapper method for addUserToGroup
Helper wrapper method for addUserToGroup
Since
3.4
See
|
public
boolean
|
#
check( integer $userId, string $action, mixed $asset = null )
Helper wrapper method for check
Helper wrapper method for check
Parameters
- $userId
integer - $userId Id of the user for which to check authorisation.
- $action
string - $action The name of the action to authorise.
- $asset
mixed - $asset Integer asset id or the name of the asset as a string. Defaults to the
global asset node.
Returns
boolean - True if authorised.
Since
3.4
See
|
public
boolean
|
#
checkGroup( integer $groupId, string $action, mixed $asset = null )
Helper wrapper method for checkGroup
Helper wrapper method for checkGroup
Parameters
- $groupId
integer - $groupId The path to the group for which to check authorisation.
- $action
string - $action The name of the action to authorise.
- $asset
mixed - $asset Integer asset id or the name of the asset as a string. Defaults to the
global asset node.
Returns
boolean - True if authorised.
Since
3.4
See
|
public
JAccessRules
|
#
getAssetRules( mixed $asset, boolean $recursive = false )
Helper wrapper method for getAssetRules
Helper wrapper method for getAssetRules
Parameters
- $asset
mixed - $asset Integer asset id or the name of the asset as a string.
- $recursive
boolean - $recursive True to return the rules object with inherited rules.
Returns
Since
3.4
See
|
public
array
|
#
getGroupsByUser( integer $userId, boolean $recursive = true )
Helper wrapper method for getGroupsByUser
Helper wrapper method for getGroupsByUser
Parameters
- $userId
integer - $userId Id of the user for which to get the list of groups.
- $recursive
boolean - $recursive True to include inherited user groups.
Returns
array - List of user group ids to which the user is mapped.
Since
3.4
See
|
public
array
|
#
getUsersByGroup( integer $groupId, boolean $recursive = false )
Helper wrapper method for getUsersByGroup
Helper wrapper method for getUsersByGroup
Parameters
- $groupId
integer - $groupId The group Id
- $recursive
boolean - $recursive Recursively include all child groups (optional)
Returns
array
Since
3.4
See
|
public
array
|
#
getAuthorisedViewLevels( integer $userId )
Helper wrapper method for getAuthorisedViewLevels
Helper wrapper method for getAuthorisedViewLevels
Parameters
- $userId
integer - $userId Id of the user for which to get the list of authorised view levels.
Returns
array - List of view levels for which the user is authorised.
Since
3.4
See
|
public
array
|
#
getActions( string $component, string $section = 'component' )
Helper wrapper method for getActions
Helper wrapper method for getActions
Parameters
- $component
string - $component The component from which to retrieve the actions.
- $section
string - $section The name of the section within the component from which to retrieve the
actions.
Returns
array - List of actions available for the given component and section.
Since
3.4
See
|
public
boolean|array
|
#
getActionsFromFile( string $file, string $xpath = '/access/section[@name=\'component\']/' )
Helper wrapper method for getActionsFromFile
Helper wrapper method for getActionsFromFile
Parameters
- $file
string - $file The path to the XML file.
- $xpath
string - $xpath An optional xpath to search for the fields.
Returns
boolean|array - False if case of error or the list of actions available.
Since
3.4
See
|
public
boolean|array
|
#
getActionsFromData( string|SimpleXMLElement $data, string $xpath = '/access/section[@name=\'component\']/' )
Helper wrapper method for getActionsFromData
Helper wrapper method for getActionsFromData
Parameters
- $data
string|SimpleXMLElement - $data The XML string or an XML element.
- $xpath
string - $xpath An optional xpath to search for the fields.
Returns
boolean|array - False if case of error or the list of actions available.
Since
3.4
See
|
Magic methods summary