Download the PHP package raichev/twig-turbo-bundle without Composer
On this page you can find all versions of the php package raichev/twig-turbo-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raichev/twig-turbo-bundle
More information about raichev/twig-turbo-bundle
Files in raichev/twig-turbo-bundle
Package twig-turbo-bundle
Short Description Opinionated extension for Symfony UX Turbo
License MIT
Informations about the package twig-turbo-bundle
twig-turbo
Opinionated extension for Symfony UX Turbo.
This bundle is meant to be used alongside Symfony UX Turbo and provides a fast, simple and efficient way to create turbo frames
Simple example:
1) We create the frame template ("myFrame.html.twig"), by extending the base and setting the frameId & frameSrc
2) We load the frame in twig using the turboFrame function, passing the frame template as the first argument
3) In the controller method we render the frame
By default, the "placeholder" block contains a loading indicator, but if you want a different placeholder in your frame you can override it in step 2
The turboFrame function accepts a few optional arguments:
- 'variables' => variables passed to the twig template
- 'loading' => sets the turbo frame attribute of the same name, ['lazy' | 'eager'], 'eager' by default
- 'autoscroll' => sets the turbo frame attribute of the same name, false by default
- 'disabled' => sets the turbo frame attribute of the same name, false by default
- 'withContext' => when true the twig template can access its parent's variables, false by default
The default values above can be changed via the bundle config
All versions of twig-turbo-bundle with dependencies
symfony/config Version ^6|^7
symfony/dependency-injection Version ^6|^7
symfony/twig-bundle Version ^6|^7