Access

Wrapper class for Access

deprecated
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

package

Joomla CMS

Methods

check

Helper wrapper method for check

check(int userId, string action, mixed asset = null) : bool
deprecated
see Access::check()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

userId

intId of the user for which to check authorisation.

action

stringThe name of the action to authorise.

asset

mixedInteger asset id or the name of the asset as a string. Defaults to the global asset node.

Response

boolTrue if authorised.

checkGroup

Helper wrapper method for checkGroup

checkGroup(int groupId, string action, mixed asset = null) : bool
deprecated
see Access::checkGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

groupId

intThe path to the group for which to check authorisation.

action

stringThe name of the action to authorise.

asset

mixedInteger asset id or the name of the asset as a string. Defaults to the global asset node.

Response

boolTrue if authorised.

clearStatics

Helper wrapper method for addUserToGroup

clearStatics() : void
deprecated
see Access::clearStatics
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

getActions

Helper wrapper method for getActions

getActions(string component, string section = 'component') : array
deprecated
see Access::getActions()
since

3.4

deprecated

4.0 Use StaticAccess::getActionsFromFile or StaticAccess::getActionsFromData instead.

Arguments

component

stringThe component from which to retrieve the actions.

section

stringThe name of the section within the component from which to retrieve the actions.

Response

arrayList of actions available for the given component and section.

getActionsFromData

Helper wrapper method for getActionsFromData

getActionsFromData(string|\SimpleXMLElement data, string xpath = '/access/section[@name='component']/') : bool|array
deprecated
see Access::getActionsFromData()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

data

string|\SimpleXMLElementThe XML string or an XML element.

xpath

stringAn optional xpath to search for the fields.

Response

bool|arrayFalse if case of error or the list of actions available.

getActionsFromFile

Helper wrapper method for getActionsFromFile

getActionsFromFile(string file, string xpath = '/access/section[@name='component']/') : bool|array
deprecated
see Access::getActionsFromFile()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

file

stringThe path to the XML file.

xpath

stringAn optional xpath to search for the fields.

Response

bool|arrayFalse if case of error or the list of actions available.

getAssetRules

Helper wrapper method for getAssetRules

getAssetRules(mixed asset, bool recursive = false) : \Joomla\CMS\Access\Rules
deprecated
see Access::getAssetRules
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

asset

mixedInteger asset id or the name of the asset as a string.

recursive

boolTrue to return the rules object with inherited rules.

Response

\Joomla\CMS\Access\RulesAccessRules object for the asset.

getAuthorisedViewLevels

Helper wrapper method for getAuthorisedViewLevels

getAuthorisedViewLevels(int userId) : array
deprecated
see Access::getAuthorisedViewLevels()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

userId

intId of the user for which to get the list of authorised view levels.

Response

arrayList of view levels for which the user is authorised.

getGroupsByUser

Helper wrapper method for getGroupsByUser

getGroupsByUser(int userId, bool recursive = true) : array
deprecated
see Access::getGroupsByUser()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

userId

intId of the user for which to get the list of groups.

recursive

boolTrue to include inherited user groups.

Response

arrayList of user group ids to which the user is mapped.

getUsersByGroup

Helper wrapper method for getUsersByGroup

getUsersByGroup(int groupId, bool recursive = false) : array
deprecated
see Access::getUsersByGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\Access\Access directly

Arguments

groupId

intThe group Id

recursive

boolRecursively include all child groups (optional)

Response

array