No description
Find a file
2024-06-02 18:23:21 +02:00
.woodpecker First working version 2024-06-01 23:15:35 +02:00
Classes adding augmentations for select and textfield ViewHelpers 2024-06-02 18:23:21 +02:00
Configuration adding augmentations for select and textfield ViewHelpers 2024-06-02 18:23:21 +02:00
Resources/Private adding augmentations for select and textfield ViewHelpers 2024-06-02 18:23:21 +02:00
Tests/Functional adding augmentations for select and textfield ViewHelpers 2024-06-02 18:23:21 +02:00
composer.json fixing description and adding depency to fluid-adaptor 2024-06-01 23:20:41 +02:00
License.txt First working version 2024-06-01 23:15:35 +02:00
README.md adding augmentations for select and textfield ViewHelpers 2024-06-02 18:23:21 +02:00

DigiComp.FluidRenderFunctions

Quickstart

This Package provides you with the possibility to register render functions, created from them, to use them dynamically else where.

Let me show you the idea:

<f:form.select options="{books}" />

Assuming you know how the SelectViewHelper works, you know, you can provide an "optionLabelField"-argument to adivce the ViewHelper to use a property of your options. But, what if you want to use a complete template, to display your books? FluidRenderFunctions to the rescue:

<rf:registerRenderFunction as="renderBook" subjectName="myBook">
    {myBook.name} from {myBook.author.name}
</rf:registerRenderFunction>
<f:form.select options="{books -> rf:applyRenderFunction(function: 'renderBook')}" />

To make your live easier, FluidRenderFunctions augments the original SelectViewHelper and the TextfieldViewHelper with an optional renderFunction argument. That way, you can even use the usual Textfield to display formatted Datetime objects. Neat!

Configuration

If - for whatever reason - you do not want FluidRenderFunctions to augment the original ViewHelpers you can opt out by setting DigiComp.FluidRenderFunctions.enableAspects.select or DigiComp.FluidRenderFunctions.enableAspects.textfield to false.