PHP Class BookStack\Repos\EntityRepo

Afficher le fichier Open project: ssddanbrown/bookstack Class Usage Examples

Méthodes publiques

Свойство Type Description
$book BookStack\Book
$chapter BookStack\Chapter
$page BookStack\Page

Protected Properties

Свойство Type Description
$permissionService BookStack\Services\PermissionService
$queryOperators array Acceptable operators to be used in a query

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

EntityService constructor.
public __construct ( )

addAdvancedSearchQueries() protected méthode

Parses advanced search notations and adds them to the db query.
protected addAdvancedSearchQueries ( $query, $termString ) : mixed
$query
$termString
Résultat mixed

applyTagSearches() protected méthode

Apply extracted tag search terms onto a entity query.
protected applyTagSearches ( $query, $tags ) : mixed
$query
$tags
Résultat mixed

buildJointPermissions() public méthode

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

cleanSearchTermString() protected méthode

Removes any special search notation that should not be used in a full-text search.
protected cleanSearchTermString ( $termString ) : mixed
$termString
Résultat mixed

getRecentlyCreatedBooks() public méthode

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() public méthode

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() public méthode

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() public méthode

Get the most recently updated books.
public getRecentlyUpdatedBooks ( $count = 20, integer $page ) : mixed
$count
$page integer
Résultat mixed

getRecentlyUpdatedPages() public méthode

Get the most recently updated pages.
public getRecentlyUpdatedPages ( $count = 20, integer $page ) : mixed
$count
$page integer
Résultat mixed

getRegexEscapedOperators() protected méthode

Get the available query operators as a regex escaped list.
protected getRegexEscapedOperators ( ) : mixed
Résultat mixed

getUserDraftPages() public méthode

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

nameToSlug() protected méthode

Format a name as a url slug.
protected nameToSlug ( $name ) : string
$name
Résultat string

prepareSearchTerms() public méthode

Keeps quoted terms together.
public prepareSearchTerms ( $termString ) : array
$termString
Résultat array

updateEntityPermissionsFromRequest() public méthode

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

Property Details

$book public_oe property

public Book,BookStack $book
Résultat BookStack\Book

$chapter public_oe property

public Chapter,BookStack $chapter
Résultat BookStack\Chapter

$page public_oe property

public Page,BookStack $page
Résultat BookStack\Page

$permissionService protected_oe property

protected PermissionService,BookStack\Services $permissionService
Résultat BookStack\Services\PermissionService

$queryOperators protected_oe property

Acceptable operators to be used in a query
protected array $queryOperators
Résultat array