PHP Class Bootstrapper\Form

See also: http://twitter.github.com/bootstrap/
Author: Patrick Talmadge - ([email protected])
Author: Maxime Fabre - ([email protected])
Author: Patrick Rose - ([email protected])
Author: Marvin Schröder - ([email protected])
Inheritance: extends Illuminate\Support\Facades\Facade
Afficher le fichier Open project: patricktalmadge/bootstrapper Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

color() public méthode

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
Résultat string

date() public méthode

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
Résultat string

datetime() public méthode

Creates a datetime form element
See also: 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
Résultat string

datetimelocal() public méthode

Creates a datetime local element
See also: Illuminate\FormBuilder\input()
public datetimelocal ( string $name, null $value = null, array $attributes = [] ) : string
$name string The name of the element
$value null
$attributes array
Résultat string

email() public méthode

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
Résultat string

error() public méthode

Creates an error validation block
See also: 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
Résultat string

feedback() public méthode

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
Résultat string

getFormattedError() public méthode

Get the formatted errors for the form element with the given name.
public getFormattedError ( string $name ) : string
$name string
Résultat string

hasErrors() public méthode

Determine whether the form element with the given name has any validation errors.
public hasErrors ( string $name ) : boolean
$name string
Résultat boolean

help() public méthode

Creates a help block
public help ( string $helpText, array $attributes = [] ) : string
$helpText string The help text
$attributes array
Résultat string

horizontal() public méthode

Opens a horizontal form
public horizontal ( array $attributes = [] ) : string
$attributes array
Résultat string

horizontalModel() public méthode

Opens a horizontal form with a given model
See also: Bootstrapper\Form::horizontal()
See also: Illuminate\Html::model()
public horizontalModel ( mixed $model, array $attributes = [] ) : string
$model mixed
$attributes array
Résultat string

inline() public méthode

Opens an inline form
public inline ( array $attributes = [] ) : string
$attributes array The attributes of the array
Résultat string

inlineModel() public méthode

Opens a inline form with a given model
See also: Bootstrapper\Form::inline()
See also: Illuminate\Html::model()
public inlineModel ( mixed $model, array $attributes = [] ) : string
$model mixed
$attributes array
Résultat string

label() public méthode

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
Résultat string

month() public méthode

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
Résultat string

number() public méthode

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
Résultat string

password() public méthode

public password ( string $name, array $attributes = [] ) : string
$name string The name of the password input
$attributes array The attributes of the input
Résultat string

select() public méthode

public select ( string $name, array $list = [], null $selected = null, array $attributes = [] ) : string
$name string
$list array
$selected null
$attributes array
Résultat string

submit() public méthode

public submit ( string | null $value = null, array $options = [] ) : string
$value string | null The value of the submit button
$options array The options
Résultat string

success() public méthode

Creates a success validation block
See also: 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
Résultat string

tel() public méthode

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
Résultat string

text() public méthode

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
Résultat string

textarea() public méthode

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
Résultat string

time() public méthode

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
Résultat string

url() public méthode

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
Résultat string

validation() public méthode

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
Résultat string

warning() public méthode

Creates a warning validation block
See also: 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
Résultat string

week() public méthode

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
Résultat string