PHP Class Xpressengine\Permission\Grant

Author: XE Developers ([email protected])
Inheritance: extends Illuminate\Support\Fluent
Mostrar archivo Open project: xpressengine/xpressengine Class Usage Examples

Public Methods

Method Description
add ( string $action, string | array $type, mixed $value = null ) Add grant information
except ( string $action, mixed $userIds = null ) Add except user identifier
set ( string $action, string | array $type, mixed $value = null ) Set grant information

Protected Methods

Method Description
isAllowType ( stirng $type ) : boolean Check type is allowed
makeValue ( string | array $type, mixed $value = null ) : array Make value array from arguments
valueFilter ( array $value ) : array Value filter

Method Details

add() public method

Add grant information
public add ( string $action, string | array $type, mixed $value = null )
$action string action type
$type string | array value type
$value mixed values

except() public method

Add except user identifier
public except ( string $action, mixed $userIds = null )
$action string action type
$userIds mixed user id or ids

isAllowType() protected method

Check type is allowed
protected isAllowType ( stirng $type ) : boolean
$type stirng type
return boolean

makeValue() protected method

Make value array from arguments
protected makeValue ( string | array $type, mixed $value = null ) : array
$type string | array value type
$value mixed values
return array

set() public method

Set grant information
public set ( string $action, string | array $type, mixed $value = null )
$action string action type
$type string | array value type
$value mixed values

valueFilter() protected method

Value filter
protected valueFilter ( array $value ) : array
$value array values
return array