Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • Button
  • Checkbox
  • ConventionalRenderer
  • FileUpload
  • Form
  • FormContainer
  • FormControl
  • FormGroup
  • HiddenField
  • ImageButton
  • InstantClientScript
  • MultiSelectBox
  • RadioList
  • Rule
  • Rules
  • SelectBox
  • SubmitButton
  • TextArea
  • TextBase
  • TextInput

Interfaces

  • IFormControl
  • IFormRenderer
  • INamingContainer
  • ISubmitterControl
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class ConventionalRenderer

Converts a Form into the HTML output.

Nette\Object
Extended by Nette\Forms\ConventionalRenderer implements Nette\Forms\IFormRenderer
Namespace: Nette\Forms
Author: David Grudl
Located at Forms/Renderers/ConventionalRenderer.php
Methods summary
public string
# render( Nette\Forms\Form $form, string $mode = NULL )

Provides complete form rendering.

Provides complete form rendering.

Parameters

$form
Nette\Forms\Form
$mode
string
'begin', 'errors', 'body', 'end' or empty to render all

Returns

string

Implementation of

Nette\Forms\IFormRenderer::render
public Nette\Forms\ConventionalRenderer
# setClientScript( object $clientScript = NULL )

Sets JavaScript handler.

Sets JavaScript handler.

Parameters

$clientScript
object

Returns

Nette\Forms\ConventionalRenderer
provides a fluent interface
public mixed
# getClientScript( )

Returns JavaScript handler.

Returns JavaScript handler.

Returns

mixed
protected
# init( )

Initializes form.

Initializes form.

public string
# renderBegin( )

Renders form begin.

Renders form begin.

Returns

string
public string
# renderEnd( )

Renders form end.

Renders form end.

Returns

string
public string
# renderErrors( Nette\Forms\IFormControl $control = NULL )

Renders validation errors (per form or per control).

Renders validation errors (per form or per control).

Parameters

$control
Nette\Forms\IFormControl

Returns

string
public string
# renderBody( )

Renders form body.

Renders form body.

Returns

string
public string
# renderControls( Nette\Forms\FormContainer|Nette\Forms\FormGroup $parent )

Renders group of controls.

Renders group of controls.

Parameters

$parent
Nette\Forms\FormContainer|Nette\Forms\FormGroup

Returns

string
public string
# renderPair( Nette\Forms\IFormControl $control )

Renders single visual row.

Renders single visual row.

Parameters

$control
Nette\Forms\IFormControl

Returns

string
public string
# renderPairMulti( array $controls )

Renders single visual row of multiple controls.

Renders single visual row of multiple controls.

Parameters

$controls
array
of IFormControl

Returns

string
public string
# renderLabel( Nette\Forms\IFormControl $control )

Renders 'label' part of visual row of controls.

Renders 'label' part of visual row of controls.

Parameters

$control
Nette\Forms\IFormControl

Returns

string
public string
# renderControl( Nette\Forms\IFormControl $control )

Renders 'control' part of visual row of controls.

Renders 'control' part of visual row of controls.

Parameters

$control
Nette\Forms\IFormControl

Returns

string
protected Nette\Web\Html
# getWrapper( string $name )

Parameters

$name
string

Returns

Nette\Web\Html
protected string
# getValue( string $name )

Parameters

$name
string

Returns

string
Methods inherited from Nette\Object
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
public array $wrappers array( 'form' => array( 'container' => NULL, 'errors' => TRUE, ), 'error' => array( 'container' => 'ul class=error', 'item' => 'li', ), 'group' => array( 'container' => 'fieldset', 'label' => 'legend', 'description' => 'p', ), 'controls' => array( 'container' => 'table', ), 'pair' => array( 'container' => 'tr', '.required' => 'required', '.optional' => NULL, '.odd' => NULL, ), 'control' => array( 'container' => 'td', '.odd' => NULL, 'errors' => FALSE, 'description' => 'small', 'requiredsuffix' => '', '.required' => 'required', '.text' => 'text', '.password' => 'text', '.file' => 'text', '.submit' => 'button', '.image' => 'imagebutton', '.button' => 'button', ), 'label' => array( 'container' => 'th', 'suffix' => NULL, 'requiredsuffix' => '', ), 'hidden' => array( 'container' => 'div', ), )
#

/--- form.container

/--- form.container

\--

/--- if (form.errors) error.container .... error.item [.class] \---
/--- hidden.container .... HIDDEN CONTROLS \---
/--- group.container .... group.label .... group.description
/--- controls.container
/--- pair.container [.required .optional .odd]
/--- label.container .... LABEL .... label.suffix .... label.requiredsuffix \---
/--- control.container [.odd] .... CONTROL [.required .text .password .file .submit .button] .... control.requiredsuffix .... control.description .... if (control.errors) error.container \--- \--- \--- \--- \--

protected Nette\Forms\Form $form
#
protected object $clientScript TRUE
#
protected integer $counter
#
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0