PHP Class mdm\admin\models\AuthItem

Since: 1.0
Author: Misbahul D Munir ([email protected])
Inheritance: extends yii\base\Model
Show file Open project: mdmsoft/yii2-admin Class Usage Examples

Public Properties

Property Type Description
$data
$description
$name
$ruleName
$type

Public Methods

Method Description
__construct ( Item $item = null, array $config = [] ) Initialize object
addChildren ( array $items ) : integer Adds an item as a child of another item.
attributeLabels ( )
checkRule ( ) Check for rule
find ( string $id ) : null | self Find role
getIsNewRecord ( ) : boolean Check if is new record.
getItem ( ) : Item Get item
getItems ( ) : array Get items
getTypeName ( mixed $type = null ) : string | array Get type name
removeChildren ( array $items ) : integer Remove an item as a child of another item.
rules ( )
save ( ) : boolean Save role to [[\yii\rbac\authManager]]
unique ( ) Check role is unique

Method Details

__construct() public method

Initialize object
public __construct ( Item $item = null, array $config = [] )
$item yii\rbac\Item
$config array

addChildren() public method

Adds an item as a child of another item.
public addChildren ( array $items ) : integer
$items array
return integer

attributeLabels() public method

public attributeLabels ( )

checkRule() public method

Check for rule
public checkRule ( )

find() public static method

Find role
public static find ( string $id ) : null | self
$id string
return null | self

getIsNewRecord() public method

Check if is new record.
public getIsNewRecord ( ) : boolean
return boolean

getItem() public method

Get item
public getItem ( ) : Item
return yii\rbac\Item

getItems() public method

Get items
public getItems ( ) : array
return array

getTypeName() public static method

Get type name
public static getTypeName ( mixed $type = null ) : string | array
$type mixed
return string | array

removeChildren() public method

Remove an item as a child of another item.
public removeChildren ( array $items ) : integer
$items array
return integer

rules() public method

public rules ( )

save() public method

Save role to [[\yii\rbac\authManager]]
public save ( ) : boolean
return boolean

unique() public method

Check role is unique
public unique ( )

Property Details

$data public property

public $data

$description public property

public $description

$name public property

public $name

$ruleName public property

public $ruleName

$type public property

public $type