Method |
Description |
|
__construct ( PageRevision $pageRevision, TagRepo $tagRepo ) |
PageRepo constructor. |
|
changeBook ( integer $bookId, Page $page ) : Page |
Changes the related book for the specified page. |
|
changePageParent ( Page $page, Entity $parent ) |
Change the page's parent to the given entity. |
|
countBySlug ( $slug, $bookId ) : mixed |
Count the pages with a particular slug within a book. |
|
destroy ( Page $page ) |
Destroy a given page along with its dependencies. |
|
doesSlugExist ( $slug, $bookId, boolean | false $currentId = false ) : boolean |
Checks if a slug exists within a book already. |
|
findPageUsingOldSlug ( $pageSlug, $bookSlug ) : null | Page |
Search through page revisions and retrieve
the last page in the current book that
has a slug equal to the one given. |
|
findSuitableSlug ( string $name, integer $bookId, boolean | false $currentId = false ) : string |
Gets a suitable slug for the resource |
|
getById ( $id, boolean $allowDrafts = false ) : Page |
Get a page via a specific ID. |
|
getBySearch ( string $term, array $whereTerms = [], integer $count = 20, array $paginationAppends = [] ) : mixed |
Gets pages by a search term. |
|
getBySlug ( $slug, $bookId ) : Page |
Get a page identified by the given slug. |
|
getDraftPage ( Book $book, Chapter | boolean $chapter = false ) : static |
Get a new draft page instance. |
|
getPageEditingActiveMessage ( Page $page, null $minRange = null ) : string |
Get a notification message concerning the editing activity on
a particular page. |
|
getPageNav ( Page $page ) : array |
Parse te headers on the page to get a navigation menu |
|
getRecentlyCreatedPaginated ( $count = 20 ) : mixed |
Get the latest pages added to the system. |
|
getRecentlyUpdatedPaginated ( $count = 20 ) : mixed |
Get the latest pages added to the system. |
|
getRevisionById ( $id ) : PageRevision |
Gets a single revision via it's id. |
|
getUserPageDraft ( Page $page, $userId ) : mixed |
Get the latest updated draft revision for a particular page and user. |
|
getUserPageDraftMessage ( PageRevision $draft ) : string |
Get the notification message that informs the user that they are editing a draft page. |
|
hasUserGotPageDraft ( Page $page, $userId ) : boolean |
Checks whether a user has a draft version of a particular page or not. |
|
isPageEditingActive ( Page $page, null $minRange = null ) : boolean |
Check if a page is being actively editing. |
|
newFromInput ( $input ) : Page |
Get a new Page instance from the given input. |
|
publishDraft ( Page $draftPage, array $input ) : Page |
Publish a draft page to make it a normal page. |
|
restoreRevision ( Page $page, Book $book, integer $revisionId ) : Page |
Restores a revision's content back into a page. |
|
saveRevision ( Page $page, null | string $summary = null ) |
Saves a page revision into the system. |
|
saveUpdateDraft ( Page $page, array $data = [] ) : PageRevision |
Save a page update draft. |
|
searchForImage ( $imageString ) : mixed |
Search for image usage. |
|
updateDraftPage ( Page $page, array $data = [] ) : Page |
Update a draft page. |
|
updatePage ( Page $page, integer $book_id, string $input ) : Page |
Updates a page with any fillable data and saves it into the database. |
|