PermissionModel
class PermissionModel extends Model
A Model that can be managed by users with specific permissions
Constants
CREATE_PERMISSION |
The permission required to create such a model |
EDIT_PERMISSION |
The permission required to edit such a model |
SOFT_DELETE_PERMISSION |
The permission required to mark this model as deleted |
HARD_DELETE_PERMISSION |
The permission required to delete this model from the database |
Methods
Find out whether a player should know that a model exists
Details
at line line 46
bool
canBeSeenBy(Player $player, bool $showDeleted = false)
Find out whether a player should know that a model exists
at line line 73
static bool
canBeCreatedBy(Player $player)
Find out whether a player can create a model of this type
If possible, prefer to override PermissionModel::CREATE_PERMISSION
at line line 87
bool
canBeEditedBy(Player $player)
Find out whether a player can edit this model
If possible, prefer to override PermissionModel::EDIT_PERMISSION and/or PermissionModel::isEditor()
at line line 101
bool
canBeSoftDeletedBy(Player $player)
Find out whether a player can soft delete the model
If possible, prefer to override PermissionModel::SOFTDELETEPERMISSION and/or PermissionModel::isEditor()
at line line 114
bool
canBeHardDeletedBy(Player $player)
Find out whether a player can delete this model
If possible, prefer to override PermissionModel::HARDDELETEPERMISSION