PHP Class BookStack\Entity

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

Méthodes publiques

Méthode Description
activity ( ) : Illuminate\Database\Eloquent\Relations\MorphMany Gets the activity objects for this entity.
fullTextSearchQuery ( string[] $fieldsToSearch, string[] $terms, $wheres = [] ) : mixed Perform a full-text search on this entity.
getEntityInstance ( $type ) : Entity Get an instance of an entity of the given type.
getShortName ( integer $length = 25 ) : string Gets a limited-length version of the entities name.
getType ( ) : mixed Get entity type.
hasActiveRestriction ( $role_id, $action ) : boolean Check if this entity has live (active) restrictions in place.
hasRestriction ( $role_id, $action ) : boolean Check if this entity has a specific restriction set against it.
isA ( $type ) : boolean Allows checking of the exact class, Used to check entity type.
jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany Get the entity jointPermissions this is connected to.
matches ( $entity ) : boolean Compares this entity to another given entity.
matchesOrContains ( Entity $entity ) : boolean Checks if an entity matches or contains another given entity.
permissions ( ) Get this entities restrictions.
tags ( ) : Illuminate\Database\Eloquent\Relations\MorphMany Get the Tag models that have been user assigned to this entity.
views ( ) Get View objects for this entity.

Method Details

activity() public méthode

Gets the activity objects for this entity.
public activity ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Résultat Illuminate\Database\Eloquent\Relations\MorphMany

fullTextSearchQuery() public méthode

Perform a full-text search on this entity.
public fullTextSearchQuery ( string[] $fieldsToSearch, string[] $terms, $wheres = [] ) : mixed
$fieldsToSearch string[]
$terms string[]
Résultat mixed

getEntityInstance() public static méthode

Get an instance of an entity of the given type.
public static getEntityInstance ( $type ) : Entity
$type
Résultat Entity

getShortName() public méthode

Gets a limited-length version of the entities name.
public getShortName ( integer $length = 25 ) : string
$length integer
Résultat string

getType() public static méthode

Get entity type.
public static getType ( ) : mixed
Résultat mixed

hasActiveRestriction() public méthode

Check if this entity has live (active) restrictions in place.
public hasActiveRestriction ( $role_id, $action ) : boolean
$role_id
$action
Résultat boolean

hasRestriction() public méthode

Check if this entity has a specific restriction set against it.
public hasRestriction ( $role_id, $action ) : boolean
$role_id
$action
Résultat boolean

isA() public static méthode

Cleaner method for is_a.
public static isA ( $type ) : boolean
$type
Résultat boolean

jointPermissions() public méthode

Get the entity jointPermissions this is connected to.
public jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Résultat Illuminate\Database\Eloquent\Relations\MorphMany

matches() public méthode

Matches by comparing class and id.
public matches ( $entity ) : boolean
$entity
Résultat boolean

matchesOrContains() public méthode

Checks if an entity matches or contains another given entity.
public matchesOrContains ( Entity $entity ) : boolean
$entity Entity
Résultat boolean

permissions() public méthode

Get this entities restrictions.
public permissions ( )

tags() public méthode

Get the Tag models that have been user assigned to this entity.
public tags ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Résultat Illuminate\Database\Eloquent\Relations\MorphMany

views() public méthode

Get View objects for this entity.
public views ( )