You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
918 B
42 lines
918 B
<?php |
|
/** |
|
* Created by Error202 |
|
* Date: 15.08.2017 |
|
*/ |
|
|
|
namespace backend\forms\rbac; |
|
|
|
use yii\base\Model; |
|
use Yii; |
|
|
|
class RbacCreateRoleForm extends Model |
|
{ |
|
public $name; |
|
public $description; |
|
public $rule_name; |
|
public $data; |
|
public $created_at; |
|
public $updated_at; |
|
|
|
public function rules() |
|
{ |
|
return [ |
|
[['name'], 'required'], |
|
[['name', 'description', 'rule_name'], 'trim'], |
|
|
|
[['description', 'data'], 'string'], |
|
[['rule_name'], 'string', 'max' => 64], |
|
[['created_at', 'updated_at'], 'integer'], |
|
]; |
|
} |
|
|
|
public function attributeLabels() |
|
{ |
|
return [ |
|
'name' => Yii::t('user', 'Role Name'), |
|
'description' => Yii::t('user', 'Role Description'), |
|
'rule_name' => Yii::t('user', 'Rule Name'), |
|
'data' => Yii::t('user', 'Role Data'), |
|
]; |
|
} |
|
}
|
|
|