PHP Trait Xpressengine\Permission\PermissionSupport

Author: XE Developers ([email protected])
ファイルを表示 Open project: xpressengine/xpressengine

Public Methods

Method Description
getPermArguments ( string $key, array | string $abilities, string $siteKey = 'default' ) : array Get permission argument
permissionMove ( string $from, string $to, string $siteKey = 'default' ) : void Move
permissionRegister ( Illuminate\Http\Request $request, string $key, array | string $abilities, string $siteKey = 'default' ) : void Register permission
permissionRegisterGrant ( string $key, Grant $grant = null, string $siteKey = 'default' ) : void Register grant to permission
permissionUnregister ( string $key, string $siteKey = 'default' ) : void Unregister permission

Protected Methods

Method Description
makeGrantData ( Illuminate\Http\Request $request, string $ability ) : array | null Make data for grant

Method Details

getPermArguments() public method

Get permission argument
public getPermArguments ( string $key, array | string $abilities, string $siteKey = 'default' ) : array
$key string permission key
$abilities array | string abilities
$siteKey string site key
return array

makeGrantData() protected method

Make data for grant
protected makeGrantData ( Illuminate\Http\Request $request, string $ability ) : array | null
$request Illuminate\Http\Request request instance
$ability string ability
return array | null

permissionMove() public method

Move
public permissionMove ( string $from, string $to, string $siteKey = 'default' ) : void
$from string previous key
$to string parent key
$siteKey string site key
return void

permissionRegister() public method

Register permission
public permissionRegister ( Illuminate\Http\Request $request, string $key, array | string $abilities, string $siteKey = 'default' ) : void
$request Illuminate\Http\Request request instance
$key string permission key
$abilities array | string abilities
$siteKey string site key
return void

permissionRegisterGrant() public method

Register grant to permission
public permissionRegisterGrant ( string $key, Grant $grant = null, string $siteKey = 'default' ) : void
$key string permission key
$grant Grant grant object
$siteKey string site key
return void

permissionUnregister() public method

Unregister permission
public permissionUnregister ( string $key, string $siteKey = 'default' ) : void
$key string permission key
$siteKey string site key
return void