PHP 클래스 PMA\libraries\config\FormDisplay

파일 보기 프로젝트 열기: phpmyadmin/phpmyadmin 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( PMA\libraries\config\ConfigFile $cf ) Constructor
displayErrors ( ) : string Displays errors
fixErrors ( ) : void Reverts erroneous fields to their default values
getConfigFile ( ) : PMA\libraries\config\ConfigFile Returns {@link ConfigFile} associated with this instance
getDisplay ( boolean $tabbed_form = false, boolean $show_restore_default = false, boolean $show_buttons = true, string $form_action = null, array $hidden_fields = null ) : string Outputs HTML for forms
getDocLink ( string $path ) : string Returns link to documentation
hasErrors ( ) : boolean Tells whether form validation failed
process ( boolean $allow_partial_save = true, boolean $check_form_submit = true ) : boolean Processes forms, returns true on successful save
registerForm ( string $form_name, array $form, integer $server_id = null ) : void Registers form in form manager
save ( array | string $forms, boolean $allow_partial_save = true ) : boolean Validates and saves form data to session

비공개 메소드들

메소드 설명
_displayFieldInput ( PMA\libraries\config\Form $form, string $field, string $system_path, string $work_path, string $translated_path, boolean $show_restore_default, boolean | null $userprefs_allow, array &$js_default ) : string Prepares data for input field display and outputs HTML code
_displayForms ( boolean $show_restore_default, array &$js_default, array &$js, boolean $show_buttons ) : string Outputs HTML for the forms under the menu tab
_fillPostArrayParameters ( array $post_values, string $key ) : void Copy items of an array to $_POST variable
_getOptName ( string $path ) : string Changes path so it can be used in URLs
_loadUserprefsInfo ( ) : void Fills out {@link userprefs_keys} and {@link userprefs_disallow}
_setComments ( string $system_path, array &$opts ) : void Sets field comments and warnings based on current environment
_validate ( ) : void Runs validation for all registered forms
_validateSelect ( &$value, array $allowed ) : boolean Validates select field and casts $value to correct type

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( PMA\libraries\config\ConfigFile $cf )
$cf PMA\libraries\config\ConfigFile Config file instance

displayErrors() 공개 메소드

Displays errors
public displayErrors ( ) : string
리턴 string HTML for errors

fixErrors() 공개 메소드

Reverts erroneous fields to their default values
public fixErrors ( ) : void
리턴 void

getConfigFile() 공개 메소드

Returns {@link ConfigFile} associated with this instance
public getConfigFile ( ) : PMA\libraries\config\ConfigFile
리턴 PMA\libraries\config\ConfigFile

getDisplay() 공개 메소드

Outputs HTML for forms
public getDisplay ( boolean $tabbed_form = false, boolean $show_restore_default = false, boolean $show_buttons = true, string $form_action = null, array $hidden_fields = null ) : string
$tabbed_form boolean if true, use a form with tabs
$show_restore_default boolean whether show "restore default" button besides the input field
$show_buttons boolean whether show submit and reset button
$form_action string action attribute for the form
$hidden_fields array array of form hidden fields (key: field name)
리턴 string HTML for forms

hasErrors() 공개 메소드

Tells whether form validation failed
public hasErrors ( ) : boolean
리턴 boolean

process() 공개 메소드

Processes forms, returns true on successful save
public process ( boolean $allow_partial_save = true, boolean $check_form_submit = true ) : boolean
$allow_partial_save boolean allows for partial form saving on failed validation
$check_form_submit boolean whether check for $_POST['submit_save']
리턴 boolean whether processing was successful

registerForm() 공개 메소드

Registers form in form manager
public registerForm ( string $form_name, array $form, integer $server_id = null ) : void
$form_name string Form name
$form array Form data
$server_id integer 0 if new server, validation; >= 1 if editing a server
리턴 void

save() 공개 메소드

Validates and saves form data to session
public save ( array | string $forms, boolean $allow_partial_save = true ) : boolean
$forms array | string array of form names
$allow_partial_save boolean allows for partial form saving on failed validation
리턴 boolean true on success (no errors and all saved)