PHP 클래스 Symfony\Bundle\FrameworkBundle\Templating\Helper\FormHelper

저자: Fabien Potencier ([email protected])
저자: Bernhard Schussek ([email protected])
상속: extends Symfony\Component\Templating\Helper\Helper
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$context
$engine
$resources
$templates
$themes
$varStack

공개 메소드들

메소드 설명
__construct ( Symfony\Component\Templating\EngineInterface $engine, array $resources ) Constructor;
enctype ( Symfony\Component\Form\FormView $view ) : string Renders the HTML enctype in the form tag, if necessary.
errors ( Symfony\Component\Form\FormView $view ) : string Renders the errors of the given view.
getName ( )
isChoiceGroup ( $label )
isChoiceSelected ( Symfony\Component\Form\FormView $view, $choice )
label ( Symfony\Component\Form\FormView $view, string $label = null, array $variables = [] ) : string Renders the label of the given view.
renderBlock ( string $name, array $variables = [] ) Render a block from a form element.
rest ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string Renders views which have not already been rendered.
row ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string Renders the entire form field "row".
setTheme ( Symfony\Component\Form\FormView $view, $themes ) Sets a theme for a given view.
widget ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string Renders the HTML for a given view.

보호된 메소드들

메소드 설명
lookupTemplate ( Symfony\Component\Form\FormView $view, string $block ) : string | boolean Returns the name of the template to use to render the block
renderSection ( Symfony\Component\Form\FormView $view, string $section, array $variables = [] ) : string Renders a template.

메소드 상세

__construct() 공개 메소드

Constructor;
public __construct ( Symfony\Component\Templating\EngineInterface $engine, array $resources )
$engine Symfony\Component\Templating\EngineInterface The templating engine
$resources array An array of theme name

enctype() 공개 메소드

Example usage templates:
enctype() ?>>
public enctype ( Symfony\Component\Form\FormView $view ) : string
$view Symfony\Component\Form\FormView The view for which to render the encoding type
리턴 string The html markup

errors() 공개 메소드

Renders the errors of the given view.
public errors ( Symfony\Component\Form\FormView $view ) : string
$view Symfony\Component\Form\FormView The view to render the errors for
리턴 string The html markup

getName() 공개 메소드

public getName ( )

isChoiceGroup() 공개 메소드

public isChoiceGroup ( $label )

isChoiceSelected() 공개 메소드

public isChoiceSelected ( Symfony\Component\Form\FormView $view, $choice )
$view Symfony\Component\Form\FormView

label() 공개 메소드

Renders the label of the given view.
public label ( Symfony\Component\Form\FormView $view, string $label = null, array $variables = [] ) : string
$view Symfony\Component\Form\FormView The view for which to render the label
$label string The label
$variables array Additional variables passed to the template
리턴 string The html markup

lookupTemplate() 보호된 메소드

Returns the name of the template to use to render the block
protected lookupTemplate ( Symfony\Component\Form\FormView $view, string $block ) : string | boolean
$view Symfony\Component\Form\FormView The form view
$block string The name of the block
리턴 string | boolean The template logical name or false when no template is found

renderBlock() 공개 메소드

Render a block from a form element.
public renderBlock ( string $name, array $variables = [] )
$name string
$variables array Additional variables (those would override the current context)

renderSection() 보호된 메소드

1. This function first looks for a block named "__
", 2. if such a block is not found the function will look for a block named "_
", 3. the type name is recursively replaced by the parent type name until a corresponding block is found
protected renderSection ( Symfony\Component\Form\FormView $view, string $section, array $variables = [] ) : string
$view Symfony\Component\Form\FormView The form view
$section string The section to render (i.e. 'row', 'widget', 'label', ...)
$variables array Additional variables
리턴 string The html markup

rest() 공개 메소드

Renders views which have not already been rendered.
public rest ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string
$view Symfony\Component\Form\FormView The parent view
$variables array An array of variables
리턴 string The html markup

row() 공개 메소드

Renders the entire form field "row".
public row ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string
$view Symfony\Component\Form\FormView The view for which to render the row
$variables array Additional variables passed to the template
리턴 string The html markup

setTheme() 공개 메소드

The theme format is ":".
public setTheme ( Symfony\Component\Form\FormView $view, $themes )
$view Symfony\Component\Form\FormView A FormView instance

widget() 공개 메소드

Example usage: widget() ?> You can pass options during the call: widget(array('attr' => array('class' => 'foo'))) ?> widget(array('separator' => '+++++)) ?>
public widget ( Symfony\Component\Form\FormView $view, array $variables = [] ) : string
$view Symfony\Component\Form\FormView The view for which to render the widget
$variables array Additional variables passed to the template
리턴 string The html markup

프로퍼티 상세

$context 보호되어 있는 프로퍼티

protected $context

$engine 보호되어 있는 프로퍼티

protected $engine

$resources 보호되어 있는 프로퍼티

protected $resources

$templates 보호되어 있는 프로퍼티

protected $templates

$themes 보호되어 있는 프로퍼티

protected $themes

$varStack 보호되어 있는 프로퍼티

protected $varStack