PHP Class BookStack\Http\Controllers\AttachmentController

Inheritance: extends Controller
Datei anzeigen Open project: ssddanbrown/bookstack

Protected Properties

Property Type Description
$attachment
$attachmentService
$pageRepo

Public Methods

Method Description
__construct ( AttachmentService $attachmentService, Attachment $attachment, PageRepo $pageRepo ) AttachmentController constructor.
attachLink ( Illuminate\Http\Request $request ) : mixed Attach a link to a page.
delete ( $attachmentId ) : mixed Delete a specific attachment in the system.
get ( $attachmentId ) : Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\RedirectResponse | Redirector | Response Get an attachment from storage.
listForPage ( $pageId ) : mixed Get the attachments for a specific page.
sortForPage ( $pageId, Illuminate\Http\Request $request ) : mixed Update the attachment sorting.
update ( $attachmentId, Illuminate\Http\Request $request ) : Attachment | mixed Update the details of an existing file.
upload ( Illuminate\Http\Request $request ) : Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\JsonResponse | Response Endpoint at which attachments are uploaded to.
uploadUpdate ( integer $attachmentId, Illuminate\Http\Request $request ) : mixed Update an uploaded attachment.

Method Details

__construct() public method

AttachmentController constructor.
public __construct ( AttachmentService $attachmentService, Attachment $attachment, PageRepo $pageRepo )
$attachmentService BookStack\Services\AttachmentService
$attachment BookStack\Attachment
$pageRepo BookStack\Repos\PageRepo

delete() public method

Delete a specific attachment in the system.
public delete ( $attachmentId ) : mixed
$attachmentId
return mixed

get() public method

Get an attachment from storage.
public get ( $attachmentId ) : Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\RedirectResponse | Redirector | Response
$attachmentId
return Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\RedirectResponse | Illuminate\Routing\Redirector | Symfony\Component\HttpFoundation\Response

listForPage() public method

Get the attachments for a specific page.
public listForPage ( $pageId ) : mixed
$pageId
return mixed

sortForPage() public method

Update the attachment sorting.
public sortForPage ( $pageId, Illuminate\Http\Request $request ) : mixed
$pageId
$request Illuminate\Http\Request
return mixed

update() public method

Update the details of an existing file.
public update ( $attachmentId, Illuminate\Http\Request $request ) : Attachment | mixed
$attachmentId
$request Illuminate\Http\Request
return BookStack\Attachment | mixed

upload() public method

Endpoint at which attachments are uploaded to.
public upload ( Illuminate\Http\Request $request ) : Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\JsonResponse | Response
$request Illuminate\Http\Request
return Illuminate\Contracts\Routing\ResponseFactory | Illuminate\Http\JsonResponse | Symfony\Component\HttpFoundation\Response

uploadUpdate() public method

Update an uploaded attachment.
public uploadUpdate ( integer $attachmentId, Illuminate\Http\Request $request ) : mixed
$attachmentId integer
$request Illuminate\Http\Request
return mixed

Property Details

$attachment protected_oe property

protected $attachment

$attachmentService protected_oe property

protected $attachmentService

$pageRepo protected_oe property

protected $pageRepo