PHP Класс BookStack\Role

Наследование: extends Illuminate\Database\Eloquent\Model
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$fillable

Открытые методы

Метод Описание
attachPermission ( RolePermission $permission ) Add a permission to this role.
detachPermission ( RolePermission $permission ) Detach a single permission from this role.
getRole ( $roleName ) : Role Get the role object for the specified role.
getSystemRole ( $roleName ) : Role Get the role object for the specified system role.
hasPermission ( $permissionName ) : boolean Check if this role has a permission.
jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\HasMany Get all related JointPermissions.
permissions ( ) The RolePermissions that belong to the role.
users ( ) The roles that belong to the role.
visible ( ) : mixed Get all visible roles

Описание методов

attachPermission() публичный Метод

Add a permission to this role.
public attachPermission ( RolePermission $permission )
$permission RolePermission

detachPermission() публичный Метод

Detach a single permission from this role.
public detachPermission ( RolePermission $permission )
$permission RolePermission

getRole() публичный статический Метод

Get the role object for the specified role.
public static getRole ( $roleName ) : Role
$roleName
Результат Role

getSystemRole() публичный статический Метод

Get the role object for the specified system role.
public static getSystemRole ( $roleName ) : Role
$roleName
Результат Role

hasPermission() публичный Метод

Check if this role has a permission.
public hasPermission ( $permissionName ) : boolean
$permissionName
Результат boolean

jointPermissions() публичный Метод

Get all related JointPermissions.
public jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\HasMany
Результат Illuminate\Database\Eloquent\Relations\HasMany

permissions() публичный Метод

The RolePermissions that belong to the role.
public permissions ( )

users() публичный Метод

The roles that belong to the role.
public users ( )

visible() публичный статический Метод

Get all visible roles
public static visible ( ) : mixed
Результат mixed

Описание свойств

$fillable защищенное свойство

protected $fillable