PHP Class mdm\admin\models\Assignment

Since: 2.5
Author: Misbahul D Munir ([email protected])
Inheritance: extends yii\base\Object
Exibir arquivo Open project: mdmsoft/yii2-admin Class Usage Examples

Public Properties

Property Type Description
$id User id
$user User

Public Methods

Method Description
__construct ( $id, $user = null, $config = [] )
__get ( $name )
assign ( array $items ) : integer Grands a roles from a user.
getItems ( ) : array Get all available and assigned roles/permission
revoke ( array $items ) : integer Revokes a roles from a user.

Method Details

__construct() public method

public __construct ( $id, $user = null, $config = [] )

__get() public method

public __get ( $name )

assign() public method

Grands a roles from a user.
public assign ( array $items ) : integer
$items array
return integer number of successful grand

getItems() public method

Get all available and assigned roles/permission
public getItems ( ) : array
return array

revoke() public method

Revokes a roles from a user.
public revoke ( array $items ) : integer
$items array
return integer number of successful revoke

Property Details

$id public_oe property

User id
public $id

$user public_oe property

User
public $user