Method to preload the Rules object for the given asset type.
Parameters
int|string|array$assetTypes The type or name of the asset (e.g. 'com_content.article', 'com_menus.menu.2').
Also accepts the asset id. An array of asset type or a special
'components' string to load all component assets.
Method to return the Rules object for an asset. The returned object can optionally hold
only the rules explicitly set for the asset or the summation of all inherited rules from
parent assets and explicit rules.
Parameters
int|string$assetKey The asset key (asset id or asset name). null fallback to root asset.
bool$recursive True to return the rules object with inherited rules.
bool$recursiveParentAsset True to calculate the rule also based on inherited component/extension rules.
bool$preload Indicates whether preloading should be used.
Returns
\Joomla\CMS\Access\Rules Rules object for the asset.
Since
1.7.0
-
The non preloading code will be removed in 4.0. All asset rules should use asset preloading.
Method to return a list of user groups mapped to a user. The returned list can optionally hold
only the groups explicitly mapped to the user or all groups both explicitly mapped and inherited
by the user.
Parameters
int$userId Id of the user for which to get the list of groups.
bool$recursive True to include inherited user groups.
Returns
array List of user group ids to which the user is mapped.