PHP 클래스 Form_Field, atk4

저자: Romans ([email protected])
상속: extends AbstractView
파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_icon Layout changes in response to adding more elements before / after
$_use_cells Will enable field wrappin inside a atk-cells/atk-cell block
$app App_Web
$attr
$button_append
$button_prepend
$caption template used to mark mandatory fields
$comment
$default_value
$error_template Description of the field shown next to it on the form.
$form
$mandatory_template template used to put errors on the field line
$no_save
$readonly
$short_name use $this->get(), ->set().
$show_input_only

보호된 프로퍼티들

프로퍼티 타입 설명
$disabled
$mandatory
$value

공개 메소드들

메소드 설명
_cutField ( )
_validateField ( $caller, $condition, $msg )
_validateNotNull ( $field )
aboveField ( ) : View
addButton ( $label, $options = [] ) Position can be either 'before' or 'after'
addClass ( $class )
addComment ( $text = '' )
addIcon ( $icon, $link = null ) Wraps input field into a to align icon correctly
afterField ( ) : View
beforeField ( ) : View
belowField ( ) : View
defaultTemplate ( )
destroy ( )
disable ( )
displayFieldError ( $msg = null )
get ( )
getInput ( $attr = [] )
getTag ( $tag, $attr = null, $value = null )
init ( ) }}}
isDisabled ( )
isMandatory ( )
loadPOST ( )
normalize ( )
performValidation ( ) Used to be called validate(), this method is called when field should do some of it's basic validation done.
render ( )
set ( $value )
setAttr ( $attr, $value = UNDEFINED )
setCaption ( $_caption )
setClass ( $class )
setComment ( $text = '' )
setFieldHint ( $var_args = null )
setForm ( $form )
setMandatory ( $mandatory = true )
setNoSave ( )
setProperty ( $property, $value ) synonym, setAttr is preferred
setReadonly ( $readonly = true )
setSeparator ( $separator )
validate ( $rule = null ) This method has been refactored to integrate with Controller_Validator.
validateField ( $condition, $msg = null ) Executes a callback. If callback returns string, shows it as error message.
validateNotNULL ( $msg = null ) Adds "X is a mandatory field" message

메소드 상세

_cutField() 공개 메소드

public _cutField ( )

_validateField() 공개 메소드

public _validateField ( $caller, $condition, $msg )

_validateNotNull() 공개 메소드

public _validateNotNull ( $field )

aboveField() 공개 메소드

public aboveField ( ) : View
리턴 View

addButton() 공개 메소드

Position can be either 'before' or 'after'
public addButton ( $label, $options = [] )

addClass() 공개 메소드

public addClass ( $class )

addComment() 공개 메소드

public addComment ( $text = '' )

addIcon() 공개 메소드

Wraps input field into a to align icon correctly
public addIcon ( $icon, $link = null )

afterField() 공개 메소드

public afterField ( ) : View
리턴 View

beforeField() 공개 메소드

public beforeField ( ) : View
리턴 View

belowField() 공개 메소드

public belowField ( ) : View
리턴 View

defaultTemplate() 공개 메소드

public defaultTemplate ( )

destroy() 공개 메소드

public destroy ( )

disable() 공개 메소드

public disable ( )

displayFieldError() 공개 메소드

public displayFieldError ( $msg = null )

get() 공개 메소드

public get ( )

getInput() 공개 메소드

public getInput ( $attr = [] )

getTag() 공개 메소드

public getTag ( $tag, $attr = null, $value = null )

init() 공개 메소드

}}}
public init ( )

isDisabled() 공개 메소드

public isDisabled ( )

isMandatory() 공개 메소드

public isMandatory ( )

loadPOST() 공개 메소드

public loadPOST ( )

normalize() 공개 메소드

public normalize ( )

performValidation() 공개 메소드

Used to be called validate(), this method is called when field should do some of it's basic validation done.
public performValidation ( )

render() 공개 메소드

public render ( )

set() 공개 메소드

public set ( $value )

setAttr() 공개 메소드

public setAttr ( $attr, $value = UNDEFINED )

setCaption() 공개 메소드

public setCaption ( $_caption )

setClass() 공개 메소드

public setClass ( $class )

setComment() 공개 메소드

public setComment ( $text = '' )

setFieldHint() 공개 메소드

public setFieldHint ( $var_args = null )

setForm() 공개 메소드

public setForm ( $form )

setMandatory() 공개 메소드

public setMandatory ( $mandatory = true )

setNoSave() 공개 메소드

public setNoSave ( )

setProperty() 공개 메소드

synonym, setAttr is preferred
public setProperty ( $property, $value )

setReadonly() 공개 메소드

public setReadonly ( $readonly = true )

setSeparator() 공개 메소드

public setSeparator ( $separator )

validate() 공개 메소드

This method has been refactored to integrate with Controller_Validator.
public validate ( $rule = null )

validateField() 공개 메소드

If callback returns "false" shows either $msg or a standard error message. about field being incorrect
public validateField ( $condition, $msg = null )

validateNotNULL() 공개 메소드

Adds "X is a mandatory field" message
public validateNotNULL ( $msg = null )

프로퍼티 상세

$_icon 공개적으로 프로퍼티

Layout changes in response to adding more elements before / after
public $_icon

$_use_cells 공개적으로 프로퍼티

Will enable field wrappin inside a atk-cells/atk-cell block
public $_use_cells

$app 공개적으로 프로퍼티

public App_Web $app
리턴 App_Web

$attr 공개적으로 프로퍼티

public $attr

$button_append 공개적으로 프로퍼티

public $button_append

$button_prepend 공개적으로 프로퍼티

public $button_prepend

$caption 공개적으로 프로퍼티

template used to mark mandatory fields
public $caption

$comment 공개적으로 프로퍼티

public $comment

$default_value 공개적으로 프로퍼티

public $default_value

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

protected $disabled

$error_template 공개적으로 프로퍼티

Description of the field shown next to it on the form.
public $error_template

$form 공개적으로 프로퍼티

public $form

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

protected $mandatory

$mandatory_template 공개적으로 프로퍼티

template used to put errors on the field line
public $mandatory_template

$no_save 공개적으로 프로퍼티

public $no_save

$readonly 공개적으로 프로퍼티

public $readonly

$short_name 공개적으로 프로퍼티

use $this->get(), ->set().
public $short_name

$show_input_only 공개적으로 프로퍼티

public $show_input_only

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

protected $value