PHP 클래스 BookStack\Http\Controllers\PageController

상속: extends Controller
파일 보기 프로젝트 열기: ssddanbrown/bookstack

보호된 프로퍼티들

프로퍼티 타입 설명
$bookRepo
$chapterRepo
$exportService
$pageRepo
$userRepo

공개 메소드들

메소드 설명
__construct ( PageRepo $pageRepo, BookRepo $bookRepo, ChapterRepo $chapterRepo, ExportService $exportService, UserRepo $userRepo ) PageController constructor.
create ( string $bookSlug, string $chapterSlug = null ) : Response Show the form for creating a new page.
createAsGuest ( Illuminate\Http\Request $request, string $bookSlug, string | null $chapterSlug = null ) : mixed Create a new page as a guest user.
destroy ( string $bookSlug, string $pageSlug ) : Response Remove the specified page from storage.
destroyDraft ( string $bookSlug, integer $pageId ) : Response Remove the specified draft page from storage.
edit ( string $bookSlug, string $pageSlug ) : Response Show the form for editing the specified page.
editDraft ( string $bookSlug, integer $pageId ) : Illuminate\Contracts\View\Factory | Illuminate\View\View Show form to continue editing a draft page.
exportHtml ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response Export a page to a self-contained HTML file.
exportPdf ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response Exports a page to pdf format using barryvdh/laravel-dompdf wrapper.
exportPlainText ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response Export a page to a simple plaintext .txt file.
getPageAjax ( integer $pageId ) : Illuminate\Http\JsonResponse Get page from an ajax request.
move ( string $bookSlug, string $pageSlug, Illuminate\Http\Request $request ) : mixed Does the action of moving the location of a page
redirectFromLink ( integer $pageId ) : Illuminate\Http\RedirectResponse | Redirector Redirect from a special link url which uses the page id rather than the name.
restoreRevision ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\Http\RedirectResponse | Redirector Restores a page using the content of the specified revision.
restrict ( string $bookSlug, string $pageSlug, Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Redirector Set the permissions for this page.
saveDraft ( Illuminate\Http\Request $request, integer $pageId ) : Illuminate\Http\JsonResponse Save a draft update as a revision.
show ( string $bookSlug, string $pageSlug ) : Response Display the specified page.
showDelete ( string $bookSlug, string $pageSlug ) : Illuminate\View\View Show the deletion page for the specified page.
showDeleteDraft ( string $bookSlug, integer $pageId ) : Illuminate\View\View Show the deletion page for the specified page.
showMove ( string $bookSlug, string $pageSlug ) : mixed Show the view to choose a new parent to move a page into.
showRecentlyCreated ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View Show a listing of recently created pages
showRecentlyUpdated ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View Show a listing of recently created pages
showRestrict ( string $bookSlug, string $pageSlug ) : Illuminate\Contracts\View\Factory | Illuminate\View\View Show the Restrictions view.
showRevision ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\View\View Shows a preview of a single revision
showRevisionChanges ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\View\View Shows the changes of a single revision
showRevisions ( string $bookSlug, string $pageSlug ) : Illuminate\View\View Shows the last revisions for this page.
store ( Illuminate\Http\Request $request, string $bookSlug, $pageId ) : Response Store a new page by changing a draft into a page.
update ( Illuminate\Http\Request $request, string $bookSlug, string $pageSlug ) : Response Update the specified page in storage.

메소드 상세

__construct() 공개 메소드

PageController constructor.
public __construct ( PageRepo $pageRepo, BookRepo $bookRepo, ChapterRepo $chapterRepo, ExportService $exportService, UserRepo $userRepo )
$pageRepo BookStack\Repos\PageRepo
$bookRepo BookStack\Repos\BookRepo
$chapterRepo BookStack\Repos\ChapterRepo
$exportService BookStack\Services\ExportService
$userRepo BookStack\Repos\UserRepo

create() 공개 메소드

Show the form for creating a new page.
public create ( string $bookSlug, string $chapterSlug = null ) : Response
$bookSlug string
$chapterSlug string
리턴 Response

createAsGuest() 공개 메소드

Create a new page as a guest user.
public createAsGuest ( Illuminate\Http\Request $request, string $bookSlug, string | null $chapterSlug = null ) : mixed
$request Illuminate\Http\Request
$bookSlug string
$chapterSlug string | null
리턴 mixed

destroy() 공개 메소드

Remove the specified page from storage.
public destroy ( string $bookSlug, string $pageSlug ) : Response
$bookSlug string
$pageSlug string
리턴 Response

destroyDraft() 공개 메소드

Remove the specified draft page from storage.
public destroyDraft ( string $bookSlug, integer $pageId ) : Response
$bookSlug string
$pageId integer
리턴 Response

edit() 공개 메소드

Show the form for editing the specified page.
public edit ( string $bookSlug, string $pageSlug ) : Response
$bookSlug string
$pageSlug string
리턴 Response

editDraft() 공개 메소드

Show form to continue editing a draft page.
public editDraft ( string $bookSlug, integer $pageId ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
$bookSlug string
$pageId integer
리턴 Illuminate\Contracts\View\Factory | Illuminate\View\View

exportHtml() 공개 메소드

Export a page to a self-contained HTML file.
public exportHtml ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response
$bookSlug string
$pageSlug string
리턴 Illuminate\Http\Response

exportPdf() 공개 메소드

https://github.com/barryvdh/laravel-dompdf
public exportPdf ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response
$bookSlug string
$pageSlug string
리턴 Illuminate\Http\Response

exportPlainText() 공개 메소드

Export a page to a simple plaintext .txt file.
public exportPlainText ( string $bookSlug, string $pageSlug ) : Illuminate\Http\Response
$bookSlug string
$pageSlug string
리턴 Illuminate\Http\Response

getPageAjax() 공개 메소드

Get page from an ajax request.
public getPageAjax ( integer $pageId ) : Illuminate\Http\JsonResponse
$pageId integer
리턴 Illuminate\Http\JsonResponse

move() 공개 메소드

Does the action of moving the location of a page
public move ( string $bookSlug, string $pageSlug, Illuminate\Http\Request $request ) : mixed
$bookSlug string
$pageSlug string
$request Illuminate\Http\Request
리턴 mixed

restoreRevision() 공개 메소드

Restores a page using the content of the specified revision.
public restoreRevision ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\Http\RedirectResponse | Redirector
$bookSlug string
$pageSlug string
$revisionId integer
리턴 Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector

restrict() 공개 메소드

Set the permissions for this page.
public restrict ( string $bookSlug, string $pageSlug, Illuminate\Http\Request $request ) : Illuminate\Http\RedirectResponse | Redirector
$bookSlug string
$pageSlug string
$request Illuminate\Http\Request
리턴 Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector

saveDraft() 공개 메소드

Save a draft update as a revision.
public saveDraft ( Illuminate\Http\Request $request, integer $pageId ) : Illuminate\Http\JsonResponse
$request Illuminate\Http\Request
$pageId integer
리턴 Illuminate\Http\JsonResponse

show() 공개 메소드

If the page is not found via the slug the revisions are searched for a match.
public show ( string $bookSlug, string $pageSlug ) : Response
$bookSlug string
$pageSlug string
리턴 Response

showDelete() 공개 메소드

Show the deletion page for the specified page.
public showDelete ( string $bookSlug, string $pageSlug ) : Illuminate\View\View
$bookSlug string
$pageSlug string
리턴 Illuminate\View\View

showDeleteDraft() 공개 메소드

Show the deletion page for the specified page.
public showDeleteDraft ( string $bookSlug, integer $pageId ) : Illuminate\View\View
$bookSlug string
$pageId integer
리턴 Illuminate\View\View

showMove() 공개 메소드

Show the view to choose a new parent to move a page into.
public showMove ( string $bookSlug, string $pageSlug ) : mixed
$bookSlug string
$pageSlug string
리턴 mixed

showRecentlyCreated() 공개 메소드

Show a listing of recently created pages
public showRecentlyCreated ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
리턴 Illuminate\Contracts\View\Factory | Illuminate\View\View

showRecentlyUpdated() 공개 메소드

Show a listing of recently created pages
public showRecentlyUpdated ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
리턴 Illuminate\Contracts\View\Factory | Illuminate\View\View

showRestrict() 공개 메소드

Show the Restrictions view.
public showRestrict ( string $bookSlug, string $pageSlug ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
$bookSlug string
$pageSlug string
리턴 Illuminate\Contracts\View\Factory | Illuminate\View\View

showRevision() 공개 메소드

Shows a preview of a single revision
public showRevision ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\View\View
$bookSlug string
$pageSlug string
$revisionId integer
리턴 Illuminate\View\View

showRevisionChanges() 공개 메소드

Shows the changes of a single revision
public showRevisionChanges ( string $bookSlug, string $pageSlug, integer $revisionId ) : Illuminate\View\View
$bookSlug string
$pageSlug string
$revisionId integer
리턴 Illuminate\View\View

showRevisions() 공개 메소드

Shows the last revisions for this page.
public showRevisions ( string $bookSlug, string $pageSlug ) : Illuminate\View\View
$bookSlug string
$pageSlug string
리턴 Illuminate\View\View

store() 공개 메소드

Store a new page by changing a draft into a page.
public store ( Illuminate\Http\Request $request, string $bookSlug, $pageId ) : Response
$request Illuminate\Http\Request
$bookSlug string
리턴 Response

update() 공개 메소드

Update the specified page in storage.
public update ( Illuminate\Http\Request $request, string $bookSlug, string $pageSlug ) : Response
$request Illuminate\Http\Request
$bookSlug string
$pageSlug string
리턴 Response

프로퍼티 상세

$bookRepo 보호되어 있는 프로퍼티

protected $bookRepo

$chapterRepo 보호되어 있는 프로퍼티

protected $chapterRepo

$exportService 보호되어 있는 프로퍼티

protected $exportService

$pageRepo 보호되어 있는 프로퍼티

protected $pageRepo

$userRepo 보호되어 있는 프로퍼티

protected $userRepo