PHP 클래스 WPDKConfigurationView

## Overview You can subclass this class to build an easy view config. This class help you to render a standard view for the configuration panel. It create for you the wrap HTML content, dispplay the form fields and update or reset the data. In addition display the message for feedback. ### Implement method You can implement some standard method for manage this view * fields() This method return an SDF array to display the form fields * content() This method is used for custom view control. Overwrite the fields() * save() Your own custom save data. If this method id not implement your data aren't saved.
사용 중단: since 1.2.0 Use WPDKPreferencesViewController and WPDKPreferencesView instead
저자: =undo= ([email protected])
상속: extends WPDKView
파일 보기 프로젝트 열기: wpxtreme/wpdk

공개 프로퍼티들

프로퍼티 타입 설명
$introduction string This is an optional string information
$title string The configuration title

공개 메소드들

메소드 설명
__construct ( string $id, string $title, WPDKConfiguration $configuration = null, object | array $sub_configuration = null, string $introduction = '' ) : WPDKConfigurationView Create WPDKConfigurationView instance object
buttonsUpdateReset ( ) : string Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide or change the default buttons on bottom form.
draw ( ) Display the content view with form, introduction, fields or custom content. You can override this method with your own drawing.
fields ( ) Return a SDF array for build the form fields
resetToDefault ( ) Reset to default values of sub configuration branch. You can override this method if your sub configuration branch is not an object or not implements a defaults() method.
updatePostData ( ) : boolean Process and set you own post data
wpdk_header_view_after_title ( WPDKHeaderView $header_view ) Display succefully configuration updated message

비공개 메소드들

메소드 설명
_introduction ( ) : string Return the introduction string, if exists, for HTML output
_processPost ( ) Update or reset configuration

메소드 상세

__construct() 공개 메소드

Create WPDKConfigurationView instance object
public __construct ( string $id, string $title, WPDKConfiguration $configuration = null, object | array $sub_configuration = null, string $introduction = '' ) : WPDKConfigurationView
$id string ID key of configuration
$title string Title of configuration view
$configuration WPDKConfiguration Optional. Main configuration pointer
$sub_configuration object | array Optional. Sub configuration
$introduction string Optional. An introduction text message
리턴 WPDKConfigurationView

buttonsUpdateReset() 공개 메소드

Return the HTML markup for standard [Reset to default] and [Update] buttons. You can override this method to hide or change the default buttons on bottom form.
부터: 1.0.0.b3
public buttonsUpdateReset ( ) : string
리턴 string

draw() 공개 메소드

Display the content view with form, introduction, fields or custom content. You can override this method with your own drawing.
public draw ( )

fields() 공개 메소드

Return a SDF array for build the form fields
public fields ( )

resetToDefault() 공개 메소드

Reset to default values of sub configuration branch. You can override this method if your sub configuration branch is not an object or not implements a defaults() method.
public resetToDefault ( )

updatePostData() 공개 메소드

Process and set you own post data
public updatePostData ( ) : boolean
리턴 boolean TRUE to update the configuration and display the standard sucessfully message, or FALSE to avoid the update configuration and do a custom display.

wpdk_header_view_after_title() 공개 메소드

Display succefully configuration updated message
public wpdk_header_view_after_title ( WPDKHeaderView $header_view )
$header_view WPDKHeaderView

프로퍼티 상세

$introduction 공개적으로 프로퍼티

This is an optional string information
public string $introduction
리턴 string

$title 공개적으로 프로퍼티

The configuration title
public string $title
리턴 string