PHP 클래스 Grav\Plugin\Admin\AdminController

상속: extends AdminBaseController
파일 보기 프로젝트 열기: getgrav/grav-plugin-admin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
checkValidFrontmatter ( string $frontmatter ) : boolean
determineFilenameIncludingLanguage ( string $current_filename, string $language ) : string The what should be the new filename when saving as a new language
initialize ( Grav\Common\Grav $grav = null, string $view = null, string $task = null, string $route = null, array $post = null )
taskActivate ( ) : boolean Set the default theme.
taskContinue ( ) : boolean Continue to the new page.
taskDisable ( ) : boolean Disable a plugin.
taskEnable ( ) : boolean Enable a plugin.
taskReset ( ) : boolean Handle the reset password action.
taskSave ( ) : boolean Handles form and saves the input data if its valid.
taskSaveNewFolder ( ) : boolean Handles creating an empty page folder (without markdown file)
taskUninstall ( ) : boolean Handles uninstalling plugins and themes
taskUpdategrav ( ) : boolean Handles updating Grav

보호된 메소드들

메소드 설명
findFirstAvailable ( string $item, Grav\Common\Page\Page $page ) : string Find the first available $item ('slug' | 'folder') for a page Used when copying a page, to determine the first available slot
prepareData ( array $data ) : object Gets the configuration data for a given view & post
preparePage ( Grav\Common\Page\Page $page, boolean $clean_header = false, string $language = '' ) Prepare a page to be stored: update its folder, name, template, header and content
taskAddmedia ( ) : boolean Handles adding a media file to a page
taskBackup ( ) : boolean Handle the backup action
taskClearCache ( ) : boolean Clear the cache.
taskCopy ( ) : boolean Save page as a new copy.
taskDelete ( ) : boolean Delete page.
taskDelmedia ( ) : boolean Handles deleting a media file from a page
taskFilterPages ( ) Handles filtering the page by modular/visible/routable in the pages list.
taskForgot ( ) : boolean Handle the email password recovery procedure.
taskGetNewsFeed ( )
taskGetNotifications ( ) Get Notifications from cache.
taskGetPackagesDependencies ( ) : boolean Handle getting a new package dependencies needed to be installed
taskGpmRelease ( ) Toggle the gpm.releases setting
taskHideNotification ( ) : boolean Clear the cache.
taskInstallDependenciesOfPackages ( )
taskInstallPackage ( )
taskKeepAlive ( ) Keep alive
taskListmedia ( ) : boolean Determines the file types allowed to be uploaded
taskLogin ( ) : boolean Handle login.
taskLogout ( ) : boolean Handle logout.
taskProcessMarkdown ( ) : boolean Process the page Markdown
taskProcessNotifications ( ) : boolean Process Notifications. Store the notifications object locally.
taskRemovePackage ( ) : boolean Handle removing a package
taskReorder ( ) : boolean Reorder pages.
taskSaveas ( ) : boolean Save the current page in a different language. Automatically switches to that language.
taskSwitchlanguage ( ) Switch the content language. Optionally redirect to a different page.

비공개 메소드들

메소드 설명
getNextOrderInFolder ( $path ) : string Get the next available ordering number in a folder

메소드 상세

checkValidFrontmatter() 공개 메소드

public checkValidFrontmatter ( string $frontmatter ) : boolean
$frontmatter string
리턴 boolean

determineFilenameIncludingLanguage() 공개 메소드

The what should be the new filename when saving as a new language
public determineFilenameIncludingLanguage ( string $current_filename, string $language ) : string
$current_filename string the current file name, including .md. Example: default.en.md
$language string The new language it will be saved as. Example: 'it' or 'en-GB'.
리턴 string The new filename. Example: 'default.it'

findFirstAvailable() 보호된 메소드

Find the first available $item ('slug' | 'folder') for a page Used when copying a page, to determine the first available slot
protected findFirstAvailable ( string $item, Grav\Common\Page\Page $page ) : string
$item string
$page Grav\Common\Page\Page
리턴 string The first available slot

initialize() 공개 메소드

public initialize ( Grav\Common\Grav $grav = null, string $view = null, string $task = null, string $route = null, array $post = null )
$grav Grav\Common\Grav
$view string
$task string
$route string
$post array

prepareData() 보호된 메소드

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

preparePage() 보호된 메소드

Prepare a page to be stored: update its folder, name, template, header and content
protected preparePage ( Grav\Common\Page\Page $page, boolean $clean_header = false, string $language = '' )
$page Grav\Common\Page\Page
$clean_header boolean
$language string

taskActivate() 공개 메소드

Set the default theme.
public taskActivate ( ) : boolean
리턴 boolean True if the action was performed.

taskAddmedia() 보호된 메소드

Handles adding a media file to a page
protected taskAddmedia ( ) : boolean
리턴 boolean True if the action was performed.

taskBackup() 보호된 메소드

Handle the backup action
protected taskBackup ( ) : boolean
리턴 boolean True if the action was performed.

taskClearCache() 보호된 메소드

Clear the cache.
protected taskClearCache ( ) : boolean
리턴 boolean True if the action was performed.

taskContinue() 공개 메소드

Continue to the new page.
public taskContinue ( ) : boolean
리턴 boolean True if the action was performed.

taskCopy() 보호된 메소드

Save page as a new copy.
protected taskCopy ( ) : boolean
리턴 boolean True if the action was performed.

taskDelete() 보호된 메소드

Delete page.
protected taskDelete ( ) : boolean
리턴 boolean True if the action was performed.

taskDelmedia() 보호된 메소드

Handles deleting a media file from a page
protected taskDelmedia ( ) : boolean
리턴 boolean True if the action was performed.

taskDisable() 공개 메소드

Disable a plugin.
public taskDisable ( ) : boolean
리턴 boolean True if the action was performed.

taskEnable() 공개 메소드

Enable a plugin.
public taskEnable ( ) : boolean
리턴 boolean True if the action was performed.

taskFilterPages() 보호된 메소드

Handles filtering the page by modular/visible/routable in the pages list.
protected taskFilterPages ( )

taskForgot() 보호된 메소드

Handle the email password recovery procedure.
protected taskForgot ( ) : boolean
리턴 boolean True if the action was performed.

taskGetNewsFeed() 보호된 메소드

protected taskGetNewsFeed ( )

taskGetNotifications() 보호된 메소드

Get Notifications from cache.
protected taskGetNotifications ( )

taskGetPackagesDependencies() 보호된 메소드

Handle getting a new package dependencies needed to be installed

taskGpmRelease() 보호된 메소드

Toggle the gpm.releases setting
protected taskGpmRelease ( )

taskHideNotification() 보호된 메소드

Clear the cache.
protected taskHideNotification ( ) : boolean
리턴 boolean True if the action was performed.

taskInstallDependenciesOfPackages() 보호된 메소드

taskInstallPackage() 보호된 메소드

protected taskInstallPackage ( )

taskKeepAlive() 보호된 메소드

Keep alive
protected taskKeepAlive ( )

taskListmedia() 보호된 메소드

Determines the file types allowed to be uploaded
protected taskListmedia ( ) : boolean
리턴 boolean True if the action was performed.

taskLogin() 보호된 메소드

Handle login.
protected taskLogin ( ) : boolean
리턴 boolean True if the action was performed.

taskLogout() 보호된 메소드

Handle logout.
protected taskLogout ( ) : boolean
리턴 boolean True if the action was performed.

taskProcessMarkdown() 보호된 메소드

Process the page Markdown
protected taskProcessMarkdown ( ) : boolean
리턴 boolean True if the action was performed.

taskProcessNotifications() 보호된 메소드

Process Notifications. Store the notifications object locally.
protected taskProcessNotifications ( ) : boolean
리턴 boolean

taskRemovePackage() 보호된 메소드

Handle removing a package
protected taskRemovePackage ( ) : boolean
리턴 boolean

taskReorder() 보호된 메소드

Reorder pages.
protected taskReorder ( ) : boolean
리턴 boolean True if the action was performed.

taskReset() 공개 메소드

Handle the reset password action.
public taskReset ( ) : boolean
리턴 boolean True if the action was performed.

taskSave() 공개 메소드

Handles form and saves the input data if its valid.
public taskSave ( ) : boolean
리턴 boolean True if the action was performed.

taskSaveNewFolder() 공개 메소드

Handles creating an empty page folder (without markdown file)
public taskSaveNewFolder ( ) : boolean
리턴 boolean True if the action was performed.

taskSaveas() 보호된 메소드

Save the current page in a different language. Automatically switches to that language.
protected taskSaveas ( ) : boolean
리턴 boolean True if the action was performed.

taskSwitchlanguage() 보호된 메소드

Switch the content language. Optionally redirect to a different page.
protected taskSwitchlanguage ( )

taskUninstall() 공개 메소드

Handles uninstalling plugins and themes
사용 중단:
public taskUninstall ( ) : boolean
리턴 boolean True if the action was performed

taskUpdategrav() 공개 메소드

Handles updating Grav
public taskUpdategrav ( ) : boolean
리턴 boolean True if the action was performed

프로퍼티 상세

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

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

$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