PHP Класс BookStack\Entity

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

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

Метод Описание
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.

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

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

Gets the activity objects for this entity.
public activity ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Результат Illuminate\Database\Eloquent\Relations\MorphMany

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

Perform a full-text search on this entity.
public fullTextSearchQuery ( string[] $fieldsToSearch, string[] $terms, $wheres = [] ) : mixed
$fieldsToSearch string[]
$terms string[]
Результат mixed

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

Get an instance of an entity of the given type.
public static getEntityInstance ( $type ) : Entity
$type
Результат Entity

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

Gets a limited-length version of the entities name.
public getShortName ( integer $length = 25 ) : string
$length integer
Результат string

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

Get entity type.
public static getType ( ) : mixed
Результат mixed

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

Check if this entity has live (active) restrictions in place.
public hasActiveRestriction ( $role_id, $action ) : boolean
$role_id
$action
Результат boolean

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

Check if this entity has a specific restriction set against it.
public hasRestriction ( $role_id, $action ) : boolean
$role_id
$action
Результат boolean

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

Cleaner method for is_a.
public static isA ( $type ) : boolean
$type
Результат boolean

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

Get the entity jointPermissions this is connected to.
public jointPermissions ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Результат Illuminate\Database\Eloquent\Relations\MorphMany

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

Matches by comparing class and id.
public matches ( $entity ) : boolean
$entity
Результат boolean

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

Checks if an entity matches or contains another given entity.
public matchesOrContains ( Entity $entity ) : boolean
$entity Entity
Результат boolean

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

Get this entities restrictions.
public permissions ( )

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

Get the Tag models that have been user assigned to this entity.
public tags ( ) : Illuminate\Database\Eloquent\Relations\MorphMany
Результат Illuminate\Database\Eloquent\Relations\MorphMany

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

Get View objects for this entity.
public views ( )