PHP Класс Symfony\Bundle\TwigBundle\Extension\FormExtension

Автор: Fabien Potencier ([email protected])
Наследование: extends Twig_Extension
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$cache
$environment
$resources
$templates
$themes

Открытые методы

Метод Описание
__construct ( array $resources = [] )
getFilters ( )
getName ( ) : string Returns the name of the extension.
getTokenParsers ( ) : array Returns the token parser instance to add to the existing list.
initRuntime ( Twig_Environment $environment )
render ( Symfony\Component\Form\FieldInterface $field, array $attributes = [], array $parameters = [], string $resources = null ) Renders the HTML for an individual form field
renderEnctype ( Form $form ) Renders the HTML enctype in the form tag, if necessary
renderErrors ( Symfony\Component\Form\FieldInterface $field, array $parameters = [] ) Renders the errors of the given field
renderHidden ( Symfony\Component\Form\FieldGroupInterface $group, array $parameters = [] ) Renders all hidden fields of the given field group
renderLabel ( Symfony\Component\Form\FieldInterface $field, $label = null, array $parameters = [] ) Renders the label of the given field
setTheme ( Symfony\Component\Form\FieldGroupInterface $group, array $resources )

Защищенные методы

Метод Описание
getWidget ( Symfony\Component\Form\FieldInterface $field, array $resources = [] )
resolveResources ( array $resources )
resolveTemplate ( $template )

Описание методов

__construct() публичный Метод

public __construct ( array $resources = [] )
$resources array

getFilters() публичный Метод

public getFilters ( )

getName() публичный Метод

Returns the name of the extension.
public getName ( ) : string
Результат string The extension name

getTokenParsers() публичный Метод

Returns the token parser instance to add to the existing list.
public getTokenParsers ( ) : array
Результат array An array of Twig_TokenParser instances

getWidget() защищенный Метод

protected getWidget ( Symfony\Component\Form\FieldInterface $field, array $resources = [] )
$field Symfony\Component\Form\FieldInterface
$resources array

initRuntime() публичный Метод

public initRuntime ( Twig_Environment $environment )
$environment Twig_Environment

render() публичный Метод

Example usage in Twig: {{ field|render }} You can pass additional variables during the call: {{ field|render(['param': 'value']) }}
public render ( Symfony\Component\Form\FieldInterface $field, array $attributes = [], array $parameters = [], string $resources = null )
$field Symfony\Component\Form\FieldInterface The field to render
$attributes array
$parameters array
$resources string

renderEnctype() публичный Метод

Example usage in Twig templates:
public renderEnctype ( Form $form )
$form Symfony\Component\Form\Form The form for which to render the encoding type

renderErrors() публичный Метод

Renders the errors of the given field
public renderErrors ( Symfony\Component\Form\FieldInterface $field, array $parameters = [] )
$field Symfony\Component\Form\FieldInterface The field to render the errors for
$parameters array

renderHidden() публичный Метод

Renders all hidden fields of the given field group
public renderHidden ( Symfony\Component\Form\FieldGroupInterface $group, array $parameters = [] )
$group Symfony\Component\Form\FieldGroupInterface The field group
$parameters array

renderLabel() публичный Метод

Renders the label of the given field
public renderLabel ( Symfony\Component\Form\FieldInterface $field, $label = null, array $parameters = [] )
$field Symfony\Component\Form\FieldInterface The field to render the label for
$parameters array

resolveResources() защищенный Метод

protected resolveResources ( array $resources )
$resources array

resolveTemplate() защищенный Метод

protected resolveTemplate ( $template )

setTheme() публичный Метод

public setTheme ( Symfony\Component\Form\FieldGroupInterface $group, array $resources )
$group Symfony\Component\Form\FieldGroupInterface
$resources array

Описание свойств

$cache защищенное статическое свойство

protected static $cache

$environment защищенное свойство

protected $environment

$resources защищенное свойство

protected $resources

$templates защищенное свойство

protected $templates

$themes защищенное свойство

protected $themes