PHP 클래스 BookStack\Http\Controllers\Controller

상속: extends Illuminate\Routing\Controller, use trait Illuminate\Foundation\Bus\DispatchesJobs, use trait Illuminate\Foundation\Validation\ValidatesRequests
파일 보기 프로젝트 열기: ssddanbrown/bookstack 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$currentUser static
$signedIn boolean

공개 메소드들

메소드 설명
__construct ( ) Controller constructor.
setPageTitle ( $title ) Adds the page title into the view.

보호된 메소드들

메소드 설명
buildFailedValidationResponse ( Illuminate\Http\Request $request, array $errors ) : Response Create the response for when a request fails validation.
checkOwnablePermission ( $permission, Ownable $ownable ) : boolean Check the current user's permissions against an ownable item.
checkPermission ( string $permissionName ) : boolean | Illuminate\Http\RedirectResponse Checks for a permission.
checkPermissionOr ( $permissionName, $callback ) : boolean Check if a user has a permission or bypass if the callback is true.
jsonError ( string $messageText = "", integer $statusCode = 500 ) : mixed Send back a json error message.
preventAccessForDemoUsers ( ) Stops the application and shows a permission error if the application is in demo mode.
showPermissionError ( ) On a permission error redirect to home and display.

메소드 상세

__construct() 공개 메소드

Controller constructor.
public __construct ( )

buildFailedValidationResponse() 보호된 메소드

Create the response for when a request fails validation.
protected buildFailedValidationResponse ( Illuminate\Http\Request $request, array $errors ) : Response
$request Illuminate\Http\Request
$errors array
리턴 Symfony\Component\HttpFoundation\Response

checkOwnablePermission() 보호된 메소드

Check the current user's permissions against an ownable item.
protected checkOwnablePermission ( $permission, Ownable $ownable ) : boolean
$permission
$ownable BookStack\Ownable
리턴 boolean

checkPermission() 보호된 메소드

Checks for a permission.
protected checkPermission ( string $permissionName ) : boolean | Illuminate\Http\RedirectResponse
$permissionName string
리턴 boolean | Illuminate\Http\RedirectResponse

checkPermissionOr() 보호된 메소드

Check if a user has a permission or bypass if the callback is true.
protected checkPermissionOr ( $permissionName, $callback ) : boolean
$permissionName
$callback
리턴 boolean

jsonError() 보호된 메소드

Send back a json error message.
protected jsonError ( string $messageText = "", integer $statusCode = 500 ) : mixed
$messageText string
$statusCode integer
리턴 mixed

preventAccessForDemoUsers() 보호된 메소드

Stops the application and shows a permission error if the application is in demo mode.

setPageTitle() 공개 메소드

Adds the page title into the view.
public setPageTitle ( $title )
$title

showPermissionError() 보호된 메소드

the error as a notification.
protected showPermissionError ( )

프로퍼티 상세

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

static
protected $currentUser

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

protected bool $signedIn
리턴 boolean