Method | Description | |
---|---|---|
__construct ( array $defaultThemes = [], Twig_Environment $environment = null ) | ||
renderBlock ( Symfony\Component\Form\FormView $view, $resource, $blockName, array $variables = [] ) | ||
setEnvironment ( Twig_Environment $environment ) |
Method | Description | |
---|---|---|
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. |
public __construct ( array $defaultThemes = [], Twig_Environment $environment = null ) | ||
$defaultThemes | array | |
$environment | Twig_Environment |
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 |
return | boolean | True if the resource could be loaded, false otherwise |
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. |
public renderBlock ( Symfony\Component\Form\FormView $view, $resource, $blockName, array $variables = [] ) | ||
$view | Symfony\Component\Form\FormView | |
$variables | array |
public setEnvironment ( Twig_Environment $environment ) | ||
$environment | Twig_Environment |