PHP Class BookStack\Role

Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: ssddanbrown/bookstack Class Usage Examples

Protected Properties

Свойство Type Description
$fillable

Méthodes publiques

Méthode Description
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

Method Details

attachPermission() public méthode

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

detachPermission() public méthode

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

getRole() public static méthode

Get the role object for the specified role.
public static getRole ( $roleName ) : Role
$roleName
Résultat Role

getSystemRole() public static méthode

Get the role object for the specified system role.
public static getSystemRole ( $roleName ) : Role
$roleName
Résultat Role

hasPermission() public méthode

Check if this role has a permission.
public hasPermission ( $permissionName ) : boolean
$permissionName
Résultat boolean

jointPermissions() public méthode

Get all related JointPermissions.
public jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\HasMany
Résultat Illuminate\Database\Eloquent\Relations\HasMany

permissions() public méthode

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

users() public méthode

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

visible() public static méthode

Get all visible roles
public static visible ( ) : mixed
Résultat mixed

Property Details

$fillable protected_oe property

protected $fillable