PHP Класс Bootstrapper\Form

См. также: http://twitter.github.com/bootstrap/
Автор: Patrick Talmadge - ([email protected])
Автор: Maxime Fabre - ([email protected])
Автор: Patrick Rose - ([email protected])
Автор: Marvin Schröder - ([email protected])
Наследование: extends Illuminate\Support\Facades\Facade
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
color ( string $name, null $value = null, array $attributes = [] ) : string Creates a color element
date ( string $name, null $value = null, array $attributes = [] ) : string Creates a date input
datetime ( string $name, null $value = null, array $attributes = [] ) : string Creates a datetime form element
datetimelocal ( string $name, null $value = null, array $attributes = [] ) : string Creates a datetime local element
email ( string $name, string | null $value = null, array $attributes = [] ) : string
error ( string $label, string $input, array $attributes = [] ) : string Creates an error validation block
feedback ( string $label, string $input, string $icon, array $attributes = [] ) : string Creates a feedback block with an icon
getFormattedError ( string $name ) : string Get the formatted errors for the form element with the given name.
hasErrors ( string $name ) : boolean Determine whether the form element with the given name has any validation errors.
help ( string $helpText, array $attributes = [] ) : string Creates a help block
horizontal ( array $attributes = [] ) : string Opens a horizontal form
horizontalModel ( mixed $model, array $attributes = [] ) : string Opens a horizontal form with a given model
inline ( array $attributes = [] ) : string Opens an inline form
inlineModel ( mixed $model, array $attributes = [] ) : string Opens a inline form with a given model
label ( string $name, string | null $value = null, array $options = [], $escape_html = true ) : string
month ( string $name, null $value = null, array $attributes = [] ) : string Creates a month input
number ( string $name, null $value = null, array $attributes = [] ) : string Creates a number form element
password ( string $name, array $attributes = [] ) : string
search ( string $name, null $value = null, array $attributes = [] ) : string Creates a search element
select ( string $name, array $list = [], null $selected = null, array $attributes = [] ) : string
submit ( string | null $value = null, array $options = [] ) : string
success ( string $label, string $input, array $attributes = [] ) : string Creates a success validation block
tel ( string $name, null $value = null, array $attributes = [] ) : string Creates a tel element
text ( string $name, string | null $value = null, array $attributes = [] ) : string
textarea ( string $name, string | null $value = null, array $attributes = [] ) : string
time ( string $name, null $value = null, array $attributes = [] ) : string Creates a time form element
url ( string $name, null $value = null, array $attributes = [] ) : string Creates a url form element
validation ( string $type, string $label, string $input, array $attributes = [] ) : string Creates a validation block
warning ( string $label, string $input, array $attributes = [] ) : string Creates a warning validation block
week ( string $name, null $value = null, array $attributes = [] ) : string Creates a week form element

Описание методов

color() публичный Метод

Creates a color element
public color ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

date() публичный Метод

Creates a date input
public date ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

datetime() публичный Метод

Creates a datetime form element
См. также: Illuminate\FormBuilder\input()
public datetime ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null The value
$attributes array The attributes
Результат string

datetimelocal() публичный Метод

Creates a datetime local element
См. также: Illuminate\FormBuilder\input()
public datetimelocal ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

email() публичный Метод

public email ( string $name, string | null $value = null, array $attributes = [] ) : string
$name string The name of the email input
$value string | null The default value of the input
$attributes array The attributes of the email input
Результат string

error() публичный Метод

Creates an error validation block
См. также: Bootstrapper\\Form::validation()
public error ( string $label, string $input, array $attributes = [] ) : string
$label string The label
$input string The input
$attributes array The attributes of the validation block
Результат string

feedback() публичный Метод

Creates a feedback block with an icon
public feedback ( string $label, string $input, string $icon, array $attributes = [] ) : string
$label string The label
$input string The input
$icon string The icon
$attributes array The attributes of the block
Результат string

getFormattedError() публичный Метод

Get the formatted errors for the form element with the given name.
public getFormattedError ( string $name ) : string
$name string
Результат string

hasErrors() публичный Метод

Determine whether the form element with the given name has any validation errors.
public hasErrors ( string $name ) : boolean
$name string
Результат boolean

help() публичный Метод

Creates a help block
public help ( string $helpText, array $attributes = [] ) : string
$helpText string The help text
$attributes array
Результат string

horizontal() публичный Метод

Opens a horizontal form
public horizontal ( array $attributes = [] ) : string
$attributes array
Результат string

horizontalModel() публичный Метод

Opens a horizontal form with a given model
См. также: Bootstrapper\Form::horizontal()
См. также: Illuminate\Html::model()
public horizontalModel ( mixed $model, array $attributes = [] ) : string
$model mixed
$attributes array
Результат string

inline() публичный Метод

Opens an inline form
public inline ( array $attributes = [] ) : string
$attributes array The attributes of the array
Результат string

inlineModel() публичный Метод

Opens a inline form with a given model
См. также: Bootstrapper\Form::inline()
См. также: Illuminate\Html::model()
public inlineModel ( mixed $model, array $attributes = [] ) : string
$model mixed
$attributes array
Результат string

label() публичный Метод

public label ( string $name, string | null $value = null, array $options = [], $escape_html = true ) : string
$name string The name of the object this label will be attached to
$value string | null The text of the label
$options array The options of the label
Результат string

month() публичный Метод

Creates a month input
public month ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

number() публичный Метод

Creates a number form element
public number ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

password() публичный Метод

public password ( string $name, array $attributes = [] ) : string
$name string The name of the password input
$attributes array The attributes of the input
Результат string

select() публичный Метод

public select ( string $name, array $list = [], null $selected = null, array $attributes = [] ) : string
$name string
$list array
$selected null
$attributes array
Результат string

submit() публичный Метод

public submit ( string | null $value = null, array $options = [] ) : string
$value string | null The value of the submit button
$options array The options
Результат string

success() публичный Метод

Creates a success validation block
См. также: Bootstrapper\\Form::validation()
public success ( string $label, string $input, array $attributes = [] ) : string
$label string The label
$input string The input
$attributes array The attributes of the validation block
Результат string

tel() публичный Метод

Creates a tel element
public tel ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

text() публичный Метод

public text ( string $name, string | null $value = null, array $attributes = [] ) : string
$name string The name of the text input
$value string | null The default value
$attributes array The attributes of the input
Результат string

textarea() публичный Метод

public textarea ( string $name, string | null $value = null, array $attributes = [] ) : string
$name string The name of the text area
$value string | null The default value
$attributes array The attributes of the text area
Результат string

time() публичный Метод

Creates a time form element
public time ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

url() публичный Метод

Creates a url form element
public url ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string

validation() публичный Метод

Creates a validation block
public validation ( string $type, string $label, string $input, array $attributes = [] ) : string
$type string The type of validation
$label string The label
$input string The input
$attributes array The attributes of the validation block
Результат string

warning() публичный Метод

Creates a warning validation block
См. также: Bootstrapper\\Form::validation()
public warning ( string $label, string $input, array $attributes = [] ) : string
$label string The label
$input string The input
$attributes array The attributes of the validation block
Результат string

week() публичный Метод

Creates a week form element
public week ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Результат string