PHP 클래스 Symfony\Bridge\Twig\Form\TwigRendererEngine

저자: Bernhard Schussek ([email protected])
상속: extends Symfony\Component\Form\AbstractRendererEngine, implements Symfony\Bridge\Twig\Form\TwigRendererEngineInterface
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $defaultThemes = [], Twig_Environment $environment = null )
renderBlock ( Symfony\Component\Form\FormView $view, $resource, $blockName, array $variables = [] )
setEnvironment ( Twig_Environment $environment )

보호된 메소드들

메소드 설명
loadResourceForBlockName ( string $cacheKey, Symfony\Component\Form\FormView $view, string $blockName ) : boolean Loads the cache with the resource for a given block name.
loadResourcesFromTheme ( string $cacheKey, mixed &$theme ) Loads the resources for all blocks in a theme.

메소드 상세

__construct() 공개 메소드

public __construct ( array $defaultThemes = [], Twig_Environment $environment = null )
$defaultThemes array
$environment Twig_Environment

loadResourceForBlockName() 보호된 메소드

This implementation eagerly loads all blocks of the themes assigned to the given view and all of its ancestors views. This is necessary, because Twig receives the list of blocks later. At that point, all blocks must already be loaded, for the case that the function "block()" is used in the Twig template.
또한 보기: getResourceForBlock()
protected loadResourceForBlockName ( string $cacheKey, Symfony\Component\Form\FormView $view, string $blockName ) : boolean
$cacheKey string The cache key of the form view
$view Symfony\Component\Form\FormView The form view for finding the applying themes
$blockName string The name of the block to load
리턴 boolean True if the resource could be loaded, false otherwise

loadResourcesFromTheme() 보호된 메소드

Loads the resources for all blocks in a theme.
protected loadResourcesFromTheme ( string $cacheKey, mixed &$theme )
$cacheKey string The cache key for storing the resource
$theme mixed The theme to load the block from. This parameter is passed by reference, because it might be necessary to initialize the theme first. Any changes made to this variable will be kept and be available upon further calls to this method using the same theme.

renderBlock() 공개 메소드

public renderBlock ( Symfony\Component\Form\FormView $view, $resource, $blockName, array $variables = [] )
$view Symfony\Component\Form\FormView
$variables array

setEnvironment() 공개 메소드

사용 중단: since version 3.3, to be removed in 4.0
public setEnvironment ( Twig_Environment $environment )
$environment Twig_Environment