PHP Класс Form_Field, atk4

Автор: Romans ([email protected])
Наследование: extends AbstractView
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_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

Защищенные свойства (Protected)

Свойство Тип Описание
$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