\App\Controller\AdminRolesController

RolesController 角色控制器

Summary

Methods
Properties
Constants
__get()
getRepositoriesInstance()
success()
error()
index()
store()
getInfo()
destroy()
getPermissions()
savePermissions()
getUsers()
searchUser()
saveUser()
removeUser()
$rolesRepo
No constants found
No protected methods found
$container
$request
$response
$session
$validation
N/A
getModuleName()
No private properties found
N/A

Properties

$rolesRepo

$rolesRepo : \Core\Repositories\Admin\RolesRepository

Type

\Core\Repositories\Admin\RolesRepository

$container

$container : \Psr\Container\ContainerInterface

Type

\Psr\Container\ContainerInterface

$request

$request : \Hyperf\HttpServer\Contract\RequestInterface

Type

\Hyperf\HttpServer\Contract\RequestInterface

$response

$response : \Core\Common\Container\Response

Type

\Core\Common\Container\Response

$session

$session : \Hyperf\Contract\SessionInterface

Type

\Hyperf\Contract\SessionInterface

$validation

$validation : \Hyperf\Validation\Contract\ValidatorFactoryInterface

Type

\Hyperf\Validation\Contract\ValidatorFactoryInterface

Methods

__get()

__get(  $key) : \Psr\Container\ContainerInterface|void

__get 隐式注入仓库类 User:YM Date:2019/11/21 Time:上午9:27

Parameters

$key

Returns

\Psr\Container\ContainerInterface|void

getRepositoriesInstance()

getRepositoriesInstance(  $key) : mixed

getRepositoriesInstance 获取仓库类实例 User:YM Date:2019/11/21 Time:上午10:30

Parameters

$key

Returns

mixed

success()

success(array  $data = array(), null  $msg = null) : \Psr\Http\Message\ResponseInterface

success 成功返回请求结果 User:YM Date:2019/11/20 Time:下午3:56

Parameters

array $data
null $msg

Returns

\Psr\Http\Message\ResponseInterface

error()

error(integer  $code = \App\Constants\StatusCode::ERR_EXCEPTION, null  $msg = null) : \Psr\Http\Message\ResponseInterface

error 业务相关错误结果返回 User:YM Date:2019/11/20 Time:下午3:56

Parameters

integer $code
null $msg

Returns

\Psr\Http\Message\ResponseInterface

index()

index() : \Psr\Http\Message\ResponseInterface

index 角色列表,角色管理 User:YM Date:2020/2/4 Time:下午9:54

Returns

\Psr\Http\Message\ResponseInterface

store()

store() : \Psr\Http\Message\ResponseInterface

store 保存,新建、编辑都用该方法,区别是否有主键id User:YM Date:2020/2/4 Time:下午9:55

Returns

\Psr\Http\Message\ResponseInterface

getInfo()

getInfo() : \Psr\Http\Message\ResponseInterface

getInfo 根据id获取单条记录信息 User:YM Date:2020/2/4 Time:下午9:56

Returns

\Psr\Http\Message\ResponseInterface

destroy()

destroy() : \Psr\Http\Message\ResponseInterface

destroy 删除角色 User:YM Date:2020/2/4 Time:下午9:56

Returns

\Psr\Http\Message\ResponseInterface

getPermissions()

getPermissions() : \Psr\Http\Message\ResponseInterface

getPermissions 获取绑定权限信息 User:YM Date:2020/2/4 Time:下午9:56

Returns

\Psr\Http\Message\ResponseInterface

savePermissions()

savePermissions() : \Psr\Http\Message\ResponseInterface

savePermissions 保存角色权限 User:YM Date:2020/2/4 Time:下午9:57

Returns

\Psr\Http\Message\ResponseInterface

getUsers()

getUsers() : \Psr\Http\Message\ResponseInterface

getUsers User:YM Date:2020/2/4 Time:下午9:57

Returns

\Psr\Http\Message\ResponseInterface

searchUser()

searchUser() : \Psr\Http\Message\ResponseInterface

searchUser 角色添加用户时搜索用户 User:YM Date:2020/2/4 Time:下午9:57

Returns

\Psr\Http\Message\ResponseInterface

saveUser()

saveUser() : \Psr\Http\Message\ResponseInterface

saveUser 为角色添加成员 User:YM Date:2020/2/4 Time:下午9:58

Returns

\Psr\Http\Message\ResponseInterface

removeUser()

removeUser() : \Psr\Http\Message\ResponseInterface

removeUser 为角色移除用户 User:YM Date:2020/2/4 Time:下午9:58

Returns

\Psr\Http\Message\ResponseInterface

getModuleName()

getModuleName() : string

getModuleName 获取所属模块 User:YM Date:2019/11/21 Time:上午9:32

Returns

string