Packages

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

Classes

  • NButton
  • NCheckbox
  • NConventionalRenderer
  • NFileUpload
  • NForm
  • NFormContainer
  • NFormGroup
  • NHiddenField
  • NImageButton
  • NInstantClientScript
  • NMultiSelectBox
  • NRadioList
  • NRule
  • NRules
  • NSelectBox
  • NSubmitButton
  • NTextArea
  • NTextBase
  • NTextInput

Interfaces

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

Class NConventionalRenderer

Converts a Form into the HTML output.

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

Provides complete form rendering.

Provides complete form rendering.

Parameters

$form
NForm
$mode
string
'begin', 'errors', 'body', 'end' or empty to render all

Returns

string

Implementation of

IFormRenderer::render
public NConventionalRenderer
# setClientScript( object $clientScript = NULL )

Sets JavaScript handler.

Sets JavaScript handler.

Parameters

$clientScript
object

Returns

NConventionalRenderer
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( IFormControl $control = NULL )

Renders validation errors (per form or per control).

Renders validation errors (per form or per control).

Parameters

$control
IFormControl

Returns

string
public string
# renderBody( )

Renders form body.

Renders form body.

Returns

string
public string
# renderControls( NFormContainer|NFormGroup $parent )

Renders group of controls.

Renders group of controls.

Parameters

$parent
NFormContainer|NFormGroup

Returns

string
public string
# renderPair( IFormControl $control )

Renders single visual row.

Renders single visual row.

Parameters

$control
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( IFormControl $control )

Renders 'label' part of visual row of controls.

Renders 'label' part of visual row of controls.

Parameters

$control
IFormControl

Returns

string
public string
# renderControl( IFormControl $control )

Renders 'control' part of visual row of controls.

Renders 'control' part of visual row of controls.

Parameters

$control
IFormControl

Returns

string
protected NHtml
# getWrapper( string $name )

Parameters

$name
string

Returns

NHtml
protected string
# getValue( string $name )

Parameters

$name
string

Returns

string
Methods inherited from NObject
__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 NForm $form
#
protected object $clientScript TRUE
#
protected integer $counter
#
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0