Property | Type | Description | |
---|---|---|---|
$allowedActions | array | Cached actions per Role |
Property | Type | Description | |
---|---|---|---|
$_pathWhitelist | Path Whitelist |
Method | Description | |
---|---|---|
__construct ( View $View, $settings = [] ) | Constructor | |
beforeRender ( $viewFile ) | beforeRender | |
getAllowedActionsByRoleId ( integer $roleId ) : array | Returns an array of allowed actions for current logged in Role | |
getAllowedActionsByUserId ( integer $userId ) : array | Returns an array of allowed actions for current logged in User | |
linkIsAllowedByRoleId ( integer $roleId, $url ) : boolean | Check if url is allowed for the Role | |
linkIsAllowedByUserId ( integer $userId, array | string $url ) : boolean | Check if url is allowed for the User |
Method | Description | |
---|---|---|
_isWhitelist ( $url ) : boolean | Checks whether path is in whitelist |
public __construct ( View $View, $settings = [] ) | ||
$View | View |
protected _isWhitelist ( $url ) : boolean | ||
return | boolean | True if path is in the whitelist |
public getAllowedActionsByRoleId ( integer $roleId ) : array | ||
$roleId | integer | Role id |
return | array |
public getAllowedActionsByUserId ( integer $userId ) : array | ||
$userId | integer | User id |
return | array |
public linkIsAllowedByRoleId ( integer $roleId, $url ) : boolean | ||
$roleId | integer | Role id |
$url | array | |
return | boolean |
public array $allowedActions | ||
return | array |