[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 193 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
FormExtension:: (12 methods):
__construct()
initRuntime()
getTokenParsers()
getFunctions()
getFilters()
getTests()
renderCsrfToken()
humanize()
isSelectedChoice()
isRootForm()
encodeCurrency()
getName()
Class: FormExtension - X-Ref
FormExtension extends Twig with form capabilities.__construct(TwigRendererInterface $renderer) X-Ref |
This property is public so that it can be accessed directly from compiled templates without having to call a getter, which slightly decreases performance. |
initRuntime(Environment $environment) X-Ref |
{@inheritdoc} |
getTokenParsers() X-Ref |
{@inheritdoc} |
getFunctions() X-Ref |
{@inheritdoc} |
getFilters() X-Ref |
{@inheritdoc} |
getTests() X-Ref |
{@inheritdoc} |
renderCsrfToken($intention) X-Ref |
Renders a CSRF token. param: string $intention The intention of the protected action return: string A CSRF token |
humanize($text) X-Ref |
Makes a technical name human readable. param: string $text The text to humanize return: string The humanized text |
isSelectedChoice(ChoiceView $choice, $selectedValue) X-Ref |
Returns whether a choice is selected for a given form value. Unfortunately Twig does not support an efficient way to execute the "is_selected" closure passed to the template by ChoiceType. It is faster to implement the logic here (around 65ms for a specific form). Directly implementing the logic here is also faster than doing so in ChoiceView (around 30ms). The worst option tested so far is to implement the logic in ChoiceView and access the ChoiceView method directly in the template. Doing so is around 220ms slower than doing the method call here in the filter. Twig seems to be much more efficient at executing filters than at executing methods of an object. param: ChoiceView $choice The choice to check param: string|array $selectedValue The selected value to compare return: bool Whether the choice is selected |
isRootForm(FormView $formView) X-Ref |
encodeCurrency(Environment $environment, $text, $widget = '') X-Ref |
getName() X-Ref |
{@inheritdoc} |
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |