class DefaultFormRenderer implements IFormRenderer

Converts a Form into the HTML output.

Traits

Strict class for better experience.

Properties

array $wrappers /--- form.container
protected Form $form
protected int $counter

Methods

string
render(Form $form, string $mode = null)

Provides complete form rendering.

string
renderBegin()

Renders form begin.

string
renderEnd()

Renders form end.

string
renderErrors(IControl $control = null, bool $own = true)

Renders validation errors (per form or per control).

string
renderBody()

Renders form body.

string
renderControls(Container|ControlGroup $parent)

Renders group of controls.

string
renderPair(IControl $control)

Renders single visual row.

string
renderPairMulti(array $controls)

Renders single visual row of multiple controls.

renderLabel(IControl $control)

Renders 'label' part of visual row of controls.

renderControl(IControl $control)

Renders 'control' part of visual row of controls.

getWrapper(string $name)

No description

mixed
getValue(string $name)

No description

Details

at line 131
string render(Form $form, string $mode = null)

Provides complete form rendering.

Parameters

Form $form
string $mode

Return Value

string

at line 160
string renderBegin()

Renders form begin.

Return Value

string

at line 192
string renderEnd()

Renders form end.

Return Value

string

at line 214
string renderErrors(IControl $control = null, bool $own = true)

Renders validation errors (per form or per control).

Parameters

IControl $control
bool $own

Return Value

string

at line 241
string renderBody()

Renders form body.

Return Value

string

at line 306
string renderControls(Container|ControlGroup $parent)

Renders group of controls.

Parameters

Container|ControlGroup $parent

Return Value

string

at line 347
string renderPair(IControl $control)

Renders single visual row.

Parameters

IControl $control

Return Value

string

at line 367
string renderPairMulti(array $controls)

Renders single visual row of multiple controls.

Parameters

array $controls

Return Value

string

at line 408
Html renderLabel(IControl $control)

Renders 'label' part of visual row of controls.

Parameters

IControl $control

Return Value

Html

at line 427
Html renderControl(IControl $control)

Renders 'control' part of visual row of controls.

Parameters

IControl $control

Return Value

Html

at line 464
protected Html getWrapper(string $name)

Parameters

string $name

Return Value

Html

at line 474
protected mixed getValue(string $name)

Parameters

string $name

Return Value

mixed