Class ConventionalRenderer (namespace Nette\Forms)


Converts a Form into the HTML output.

Object
   |
   --ConventionalRenderer

Implements interfaces:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Forms/Renderers/ConventionalRenderer.php (line 35)
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.
void
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 134

protected int $counter

line 137

protected Form $form

line 131

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

line 74

/--- form.container of HTML tags

Method Details

line 188

getClientScript

public mixed getClientScript ()

Returns JavaScript handler.

Output
mixed  

line 538

getValue

protected string getValue (string $name)

Input
string $name
Output
string  

line 526

getWrapper

protected Html getWrapper (string $name)

Input
string $name
Output
Html  

line 202

init

protected void init ()

Initializes form.

Output
void  

line 147

render

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

Provides complete form rendering.

Implementation of:

Input
Form $form
string $mode
Output
string  

line 229

renderBegin

public string renderBegin ()

Renders form begin.

Output
string  

line 318

renderBody

public string renderBody ()

Renders form body.

Output
string  

line 488

renderControl

public string renderControl (IFormControl $control)

Renders 'control' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 378

renderControls

public string renderControls (FormContainer|FormGroup $parent)

Renders group of controls.

Input
FormContainer|FormGroup $parent
Output
string  

line 263

renderEnd

public string renderEnd ()

Renders form end.

Output
string  

line 292

renderErrors

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

Renders validation errors (per form or per control).

Input
IFormControl $control
Output
string  

line 463

renderLabel

public string renderLabel (IFormControl $control)

Renders 'label' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 422

renderPair

public string renderPair (IFormControl $control)

Renders single visual row.

Input
IFormControl $control
Output
string  

line 441

renderPairMulti

public string renderPairMulti ($controls)

Renders single visual row of multiple controls.

Input
$controls of IFormControl
Output
string  

line 177

setClientScript

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

Sets JavaScript handler.

Input
object $clientScript
Output
void