PHP Класс BookStack\Repos\EntityRepo

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$book BookStack\Book
$chapter BookStack\Chapter
$page BookStack\Page

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

Свойство Тип Описание
$permissionService BookStack\Services\PermissionService
$queryOperators array Acceptable operators to be used in a query

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

Метод Описание
__construct ( ) EntityService constructor.
buildJointPermissions ( Collection $collection ) Alias method to update the book jointPermissions in the PermissionService.
getRecentlyCreatedBooks ( integer $count = 20, integer $page, boolean $additionalQuery = false ) Get the latest books added to the system.
getRecentlyCreatedChapters ( integer $count = 20, integer $page, boolean $additionalQuery = false ) Get the latest chapters added to the system.
getRecentlyCreatedPages ( integer $count = 20, integer $page, boolean $additionalQuery = false ) Get the latest pages added to the system.
getRecentlyUpdatedBooks ( $count = 20, integer $page ) : mixed Get the most recently updated books.
getRecentlyUpdatedPages ( $count = 20, integer $page ) : mixed Get the most recently updated pages.
getUserDraftPages ( integer $count = 20, integer $page ) Get draft pages owned by the current user.
prepareSearchTerms ( $termString ) : array Prepare a string of search terms by turning it into an array of terms.
updateEntityPermissionsFromRequest ( $request, Entity $entity ) Updates entity restrictions from a request

Защищенные методы

Метод Описание
addAdvancedSearchQueries ( $query, $termString ) : mixed Parses advanced search notations and adds them to the db query.
applyTagSearches ( $query, $tags ) : mixed Apply extracted tag search terms onto a entity query.
cleanSearchTermString ( $termString ) : mixed Removes any special search notation that should not be used in a full-text search.
getRegexEscapedOperators ( ) : mixed Get the available query operators as a regex escaped list.
nameToSlug ( $name ) : string Format a name as a url slug.

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

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

EntityService constructor.
public __construct ( )

addAdvancedSearchQueries() защищенный Метод

Parses advanced search notations and adds them to the db query.
protected addAdvancedSearchQueries ( $query, $termString ) : mixed
$query
$termString
Результат mixed

applyTagSearches() защищенный Метод

Apply extracted tag search terms onto a entity query.
protected applyTagSearches ( $query, $tags ) : mixed
$query
$tags
Результат mixed

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

Alias method to update the book jointPermissions in the PermissionService.
public buildJointPermissions ( Collection $collection )
$collection Illuminate\Support\Collection collection on entities

cleanSearchTermString() защищенный Метод

Removes any special search notation that should not be used in a full-text search.
protected cleanSearchTermString ( $termString ) : mixed
$termString
Результат mixed

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

Get the latest books added to the system.
public getRecentlyCreatedBooks ( integer $count = 20, integer $page, boolean $additionalQuery = false )
$count integer
$page integer
$additionalQuery boolean

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

Get the latest chapters added to the system.
public getRecentlyCreatedChapters ( integer $count = 20, integer $page, boolean $additionalQuery = false )
$count integer
$page integer
$additionalQuery boolean

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

Get the latest pages added to the system.
public getRecentlyCreatedPages ( integer $count = 20, integer $page, boolean $additionalQuery = false )
$count integer
$page integer
$additionalQuery boolean

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

Get the most recently updated books.
public getRecentlyUpdatedBooks ( $count = 20, integer $page ) : mixed
$count
$page integer
Результат mixed

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

Get the most recently updated pages.
public getRecentlyUpdatedPages ( $count = 20, integer $page ) : mixed
$count
$page integer
Результат mixed

getRegexEscapedOperators() защищенный Метод

Get the available query operators as a regex escaped list.
protected getRegexEscapedOperators ( ) : mixed
Результат mixed

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

Get draft pages owned by the current user.
public getUserDraftPages ( integer $count = 20, integer $page )
$count integer
$page integer

nameToSlug() защищенный Метод

Format a name as a url slug.
protected nameToSlug ( $name ) : string
$name
Результат string

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

Keeps quoted terms together.
public prepareSearchTerms ( $termString ) : array
$termString
Результат array

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

Updates entity restrictions from a request
public updateEntityPermissionsFromRequest ( $request, Entity $entity )
$request
$entity BookStack\Entity

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

$book публичное свойство

public Book,BookStack $book
Результат BookStack\Book

$chapter публичное свойство

public Chapter,BookStack $chapter
Результат BookStack\Chapter

$page публичное свойство

public Page,BookStack $page
Результат BookStack\Page

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

protected PermissionService,BookStack\Services $permissionService
Результат BookStack\Services\PermissionService

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

Acceptable operators to be used in a query
protected array $queryOperators
Результат array