PHP 클래스 Grav\Plugin\Admin\AdminBaseController

파일 보기 프로젝트 열기: getgrav/grav-plugin-admin

공개 프로퍼티들

프로퍼티 타입 설명
$blacklist_views array
$data array | null
$grav Grav\Common\Grav
$post array
$route string
$task string
$view string

보호된 프로퍼티들

프로퍼티 타입 설명
$admin Admin
$redirect string
$redirectCode integer
$upload_errors
$uri Grav\Common\Uri

공개 메소드들

메소드 설명
execute ( ) : boolean Performs a task.
redirect ( ) Redirect to the route stored in $this->redirect
setRedirect ( string $path, integer $code = 303 ) Sets the page redirect.
taskFilesSessionRemove ( ) : boolean Removes a file from the flash object session, before it gets saved
taskFilesUpload ( ) : boolean Handles ajax upload for files.
taskRemoveMedia ( ) : boolean Handles removing a media file

보호된 메소드들

메소드 설명
authorizeTask ( string $task = '', array $permissions = [] ) : boolean Checks if the user is allowed to perform the given task with its associated permissions
canEditMedia ( string $type = 'media' ) : boolean Determine if the user can edit media
cleanDataKeys ( $source = [] )
dataPermissions ( ) : array Gets the permissions needed to access a given view
filterAcceptedFiles ( $file, $settings )
getPost ( array $post ) : array Prepare and return POST data.
isMultilang ( ) : boolean Return true if multilang is active
jsonDecode ( array $data ) : array Recursively JSON decode data.
normalizeFiles ( array $data, string $key = '' ) : object Internal method to normalize the $_FILES array
prepareData ( array $data ) : array Gets the configuration data for a given view & post
storeFiles ( Grav\Common\Page\Page | Grav\Common\Data\Data $obj ) : Grav\Common\Page\Page | Grav\Common\Data\Data
taskGetFilesInFolder ( ) Used by the filepicker field to get a list of files in a folder.
taskRemoveFileFromBlueprint ( ) : boolean Handle deleting a file from a blueprint
validateNonce ( )

메소드 상세

authorizeTask() 보호된 메소드

Checks if the user is allowed to perform the given task with its associated permissions
protected authorizeTask ( string $task = '', array $permissions = [] ) : boolean
$task string The task to execute
$permissions array The permissions given
리턴 boolean True if authorized. False if not.

canEditMedia() 보호된 메소드

Determine if the user can edit media
protected canEditMedia ( string $type = 'media' ) : boolean
$type string
리턴 boolean True if the media action is allowed

cleanDataKeys() 보호된 메소드

protected cleanDataKeys ( $source = [] )

dataPermissions() 보호된 메소드

Gets the permissions needed to access a given view
protected dataPermissions ( ) : array
리턴 array An array of permissions

execute() 공개 메소드

Performs a task.
public execute ( ) : boolean
리턴 boolean True if the action was performed successfully.

filterAcceptedFiles() 보호된 메소드

protected filterAcceptedFiles ( $file, $settings )

getPost() 보호된 메소드

Prepare and return POST data.
protected getPost ( array $post ) : array
$post array
리턴 array

isMultilang() 보호된 메소드

Return true if multilang is active
protected isMultilang ( ) : boolean
리턴 boolean True if multilang is active

jsonDecode() 보호된 메소드

Recursively JSON decode data.
protected jsonDecode ( array $data ) : array
$data array
리턴 array

normalizeFiles() 보호된 메소드

Internal method to normalize the $_FILES array
protected normalizeFiles ( array $data, string $key = '' ) : object
$data array $_FILES starting point data
$key string
리턴 object a new Object with a normalized list of files

prepareData() 보호된 메소드

Gets the configuration data for a given view & post
protected prepareData ( array $data ) : array
$data array
리턴 array

redirect() 공개 메소드

Redirect to the route stored in $this->redirect
public redirect ( )

setRedirect() 공개 메소드

Sets the page redirect.
public setRedirect ( string $path, integer $code = 303 )
$path string The path to redirect to
$code integer The HTTP redirect code

storeFiles() 보호된 메소드

protected storeFiles ( Grav\Common\Page\Page | Grav\Common\Data\Data $obj ) : Grav\Common\Page\Page | Grav\Common\Data\Data
$obj Grav\Common\Page\Page | Grav\Common\Data\Data
리턴 Grav\Common\Page\Page | Grav\Common\Data\Data

taskFilesSessionRemove() 공개 메소드

Removes a file from the flash object session, before it gets saved
public taskFilesSessionRemove ( ) : boolean
리턴 boolean True if the action was performed.

taskFilesUpload() 공개 메소드

Stores in a flash object the temporary file and deals with potential file errors.
public taskFilesUpload ( ) : boolean
리턴 boolean True if the action was performed.

taskGetFilesInFolder() 보호된 메소드

Used by the filepicker field to get a list of files in a folder.
protected taskGetFilesInFolder ( )

taskRemoveFileFromBlueprint() 보호된 메소드

Handle deleting a file from a blueprint
protected taskRemoveFileFromBlueprint ( ) : boolean
리턴 boolean True if the action was performed.

taskRemoveMedia() 공개 메소드

Handles removing a media file
public taskRemoveMedia ( ) : boolean
리턴 boolean True if the action was performed

validateNonce() 보호된 메소드

protected validateNonce ( )

프로퍼티 상세

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

protected Admin,Grav\Plugin\Admin $admin
리턴 Admin

$blacklist_views 공개적으로 프로퍼티

public array $blacklist_views
리턴 array

$data 공개적으로 프로퍼티

public array|null $data
리턴 array | null

$grav 공개적으로 프로퍼티

public Grav,Grav\Common $grav
리턴 Grav\Common\Grav

$post 공개적으로 프로퍼티

public array $post
리턴 array

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

protected string $redirect
리턴 string

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

protected int $redirectCode
리턴 integer

$route 공개적으로 프로퍼티

public string $route
리턴 string

$task 공개적으로 프로퍼티

public string $task
리턴 string

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

protected $upload_errors

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

protected Uri,Grav\Common $uri
리턴 Grav\Common\Uri

$view 공개적으로 프로퍼티

public string $view
리턴 string