name = $permission->name; $this->description = $permission->description; $this->rule_name = $permission->ruleName; $this->data = $permission->data; parent::__construct($config); } 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', 'Permission Name'), 'description' => Yii::t('user', 'Permission Description'), 'rule_name' => Yii::t('user', 'Rule Name'), 'data' => Yii::t('user', 'Permission Data'), ]; } }