PHP Class Encore\Admin\Widgets\Form

Inheritance: implements Illuminate\Contracts\Support\Renderable
Datei anzeigen Open project: z-song/laravel-admin

Protected Properties

Property Type Description
$attributes array
$data array
$fields Encore\Admin\Form\Field[]

Public Methods

Method Description
__call ( string $method, array $arguments ) : Field | null Generate a Field object and add to form builder if Field exists.
__construct ( array $data = [] ) Form constructor.
__toString ( ) : string Output as string.
action ( string $action ) Action uri of the form.
attribute ( string | array $attr, string $value = '' ) Add form attributes.
findFieldClass ( string $method ) : boolean | string Find field class with given name.
formatAttribute ( array $attributes = [] ) : string Format form attributes form array to html.
hasFile ( ) : boolean Determine if form fields has files.
method ( string $method = 'POST' ) Method of the form.
render ( ) : string Render the form.

Protected Methods

Method Description
getVariables ( ) : array Get variables for render form.
initFormAttributes ( ) Initialize the form attributes.
pushField ( Field &$field ) Add a form field to form.

Method Details

__call() public method

Generate a Field object and add to form builder if Field exists.
public __call ( string $method, array $arguments ) : Field | null
$method string
$arguments array
return Encore\Admin\Form\Field | null

__construct() public method

Form constructor.
public __construct ( array $data = [] )
$data array

__toString() public method

Output as string.
public __toString ( ) : string
return string

action() public method

Action uri of the form.
public action ( string $action )
$action string

attribute() public method

Add form attributes.
public attribute ( string | array $attr, string $value = '' )
$attr string | array
$value string

findFieldClass() public static method

Find field class with given name.
public static findFieldClass ( string $method ) : boolean | string
$method string
return boolean | string

formatAttribute() public method

Format form attributes form array to html.
public formatAttribute ( array $attributes = [] ) : string
$attributes array
return string

getVariables() protected method

Get variables for render form.
protected getVariables ( ) : array
return array

hasFile() public method

Determine if form fields has files.
public hasFile ( ) : boolean
return boolean

initFormAttributes() protected method

Initialize the form attributes.
protected initFormAttributes ( )

method() public method

Method of the form.
public method ( string $method = 'POST' )
$method string

pushField() protected method

Add a form field to form.
protected pushField ( Field &$field )
$field Encore\Admin\Form\Field

render() public method

Render the form.
public render ( ) : string
return string

Property Details

$attributes protected_oe property

protected array $attributes
return array

$data protected_oe property

protected array $data
return array

$fields protected_oe property

protected Field[],Encore\Admin\Form $fields
return Encore\Admin\Form\Field[]