Class ConventionalRenderer (namespace Nette\Forms)


Converts a Form into the HTML output.

Object
   |
   --ConventionalRenderer

Implements interfaces:

Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Forms/Renderers/ConventionalRenderer.php (line 21)
Public Method Summary
mixed
Returns JavaScript handler.
string
render (Form $form, [string $mode = NULL])
Provides complete form rendering.
string
Renders form begin.
string
Renders form body.
string
Renders 'control' part of visual row of controls.
string
Renders group of controls.
string
Renders form end.
string
renderErrors ([IFormControl $control = NULL])
Renders validation errors (per form or per control).
string
Renders 'label' part of visual row of controls.
string
renderPair (IFormControl $control)
Renders single visual row.
string
renderPairMulti ($controls)
Renders single visual row of multiple controls.
ConventionalRenderer
setClientScript ([object $clientScript = NULL])
Sets JavaScript handler.
Protected Method Summary
protected string
getValue (string $name)
protected Html
getWrapper (string $name)
protected void
init ()
Initializes form.
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
protected object $clientScript TRUE

line 120

protected int $counter

line 123

protected Form $form

line 117

array $wrappers array( 'form' => array( 'container' => NULL, 'errors' => TRUE,...

line 60

/--- form.container of HTML tags

Method Details

line 175

getClientScript

public mixed getClientScript ()

Returns JavaScript handler.

Output
mixed  

line 528

getValue

protected string getValue (string $name)

Input
string $name
Output
string  

line 516

getWrapper

protected Html getWrapper (string $name)

Input
string $name
Output
Html  

line 189

init

protected void init ()

Initializes form.

Output
void  

line 133

render

public string render (Form $form, [string $mode = NULL])

Provides complete form rendering.

Implementation of:

Input
Form $form
string $mode
Output
string  

line 216

renderBegin

public string renderBegin ()

Renders form begin.

Output
string  

line 308

renderBody

public string renderBody ()

Renders form body.

Output
string  

line 478

renderControl

public string renderControl (IFormControl $control)

Renders 'control' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 368

renderControls

public string renderControls (FormContainer|FormGroup $parent)

Renders group of controls.

Input
FormContainer|FormGroup $parent
Output
string  

line 253

renderEnd

public string renderEnd ()

Renders form end.

Output
string  

line 282

renderErrors

public string renderErrors ([IFormControl $control = NULL])

Renders validation errors (per form or per control).

Input
IFormControl $control
Output
string  

line 453

renderLabel

public string renderLabel (IFormControl $control)

Renders 'label' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 412

renderPair

public string renderPair (IFormControl $control)

Renders single visual row.

Input
IFormControl $control
Output
string  

line 431

renderPairMulti

public string renderPairMulti ($controls)

Renders single visual row of multiple controls.

Input
$controls of IFormControl
Output
string  

line 163

setClientScript

public ConventionalRenderer setClientScript ([object $clientScript = NULL])

Sets JavaScript handler.

Input
object $clientScript
Output
ConventionalRenderer provides a fluent interface