Trait dmstr\db\traits\ActiveRecordAccessTrait

Trait ActiveRecordAccessTrait

Property Details

$activeAccessTrait public static property
public static bool $activeAccessTrait true
$enableFlashMessages public static property
public static bool $enableFlashMessages true

Method Details

allAccess() public static method

public static array allAccess ( )
return array

To identify all access

authItemArrayToString() public method

Decode access column by action from csv to array

public string|null authItemArrayToString ( $action, array $authItems )
$action string
$authItems array
authItemStringToArray() public method

Encode access column by action from csv to array

public array|null authItemStringToArray ( $action )
$action
beforeDelete() public method

public void beforeDelete ( )
beforeSave() public method

public void beforeSave ( $insert )
$insert
find() public static method

public static void find ( )
getUsersAuthItems() public static method

All assigned auth items for the logged in user or all available auth items for admin users

public static array getUsersAuthItems ( )
return array

With item names

hasPermission() public method

Check permission for record

public bool hasPermission ( $action null )
$action null
optsAccessDelete() public static method

For use with yii2-giiant OptsProvider

public static array optsAccessDelete ( )
return array

Available delete accesses

optsAccessDomain() public static method

For use with yii2-giiant OptsProvider

public static array optsAccessDomain ( )
return array

Available access domains

optsAccessRead() public static method

For use with yii2-giiant OptsProvider

public static array optsAccessRead ( )
return array

Available read accesses

optsAccessUpdate() public static method

For use with yii2-giiant OptsProvider

public static array optsAccessUpdate ( )
return array

Available update accesses

rules() public method

public void rules ( )