11
This commit is contained in:
@@ -35,5 +35,19 @@ class UserRole extends Base
|
||||
{
|
||||
return $this->rules ? explode(',', $this->rules) : [];
|
||||
}
|
||||
public function setRightAttr($v='',$row=[])
|
||||
{
|
||||
if(is_array($v)){
|
||||
return json_encode($v);
|
||||
}
|
||||
return $v;
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRightIds($v='',$row=[])
|
||||
{
|
||||
return $v ? (is_array($v) ? $v : json_decode($v,true)) : [];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user