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 36)
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 131

protected int $counter

line 134

protected Form $form

line 128

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

line 73

/--- form.container of HTML tags

Method Details

line 185

getClientScript

public mixed getClientScript ()

Returns JavaScript handler.

Output
mixed  

line 508

getValue

protected string getValue (string $name)

Input
string $name
Output
string  

line 496

getWrapper

protected Html getWrapper (string $name)

Input
string $name
Output
Html  

line 199

init

protected void init ()

Initializes form.

Output
void  

line 144

render

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

Provides complete form rendering.

Implementation of:

Input
Form $form
string $mode
Output
string  

line 226

renderBegin

public string renderBegin ()

Renders form begin.

Output
string  

line 298

renderBody

public string renderBody ()

Renders form body.

Output
string  

line 462

renderControl

public string renderControl (IFormControl $control)

Renders 'control' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 358

renderControls

public string renderControls (FormContainer|FormGroup $parent)

Renders group of controls.

Input
FormContainer|FormGroup $parent
Output
string  

line 243

renderEnd

public string renderEnd ()

Renders form end.

Output
string  

line 272

renderErrors

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

Renders validation errors (per form or per control).

Input
IFormControl $control
Output
string  

line 443

renderLabel

public string renderLabel (IFormControl $control)

Renders 'label' part of visual row of controls.

Input
IFormControl $control
Output
string  

line 402

renderPair

public string renderPair (IFormControl $control)

Renders single visual row.

Input
IFormControl $control
Output
string  

line 421

renderPairMulti

public string renderPairMulti ($controls)

Renders single visual row of multiple controls.

Input
$controls of IFormControl
Output
string  

line 174

setClientScript

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

Sets JavaScript handler.

Input
object $clientScript
Output
void