Download the PHP package lexal/symfony-stepped-form without Composer
On this page you can find all versions of the php package lexal/symfony-stepped-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lexal/symfony-stepped-form
More information about lexal/symfony-stepped-form
Files in lexal/symfony-stepped-form
Package symfony-stepped-form
Short Description Symfony Stepped Form Bundle.
License MIT
Informations about the package symfony-stepped-form
Symfony Stepped Form
The package is based on the HTTP Stepped Form and built for a Symfony framework.
Table of Contents
- Requirements
- Installation
- Configuration
- Usage
- License
Requirements
- PHP: >=8.2
- Symfony: ^6.4 || ^7.4 || ^8.0
Installation
Via Composer
Configuration
Register the bundle in config/bundles.php if not using Symfony Flex, and create config/packages/stepped_form.yaml for configuration options (renderer, redirector, event_dispatcher, exception_normalizers, and forms).
Example (manual bundles.php registration):
Example:
Where:
renderer- contains Renderer class or service alias that translates step's template definition into the response. Must implementLexal\HttpSteppedForm\Renderer\RendererInterface;redirector- contains Redirector class or service alias that redirects user between form steps. Must implementLexal\HttpSteppedForm\Routing\RedirectorInterface;event_dispatcher- contains Event Dispatcher class or service alias that dispatches form events. Must implementLexal\SteppedForm\EventDispatcher\EventDispatcherInterface;forms- contains form definitions. Key is the form name. Form is available in the Symfony container asstepped_form.form.<form_name>. When only one form registered, it is available via interfaceLexal\SteppedForm\SteppedFormInterface. Form definition contains:form_builder(required whenstepsis not provided) - contains FormBuilder class or service alias that builds form (only when it has dynamic steps). Must implementLexal\SteppedForm\FormBuilder\FormBuilderInterface;steps_(required whenform_builderis not provided)_ - contains an array of step class or service aliases that implementsLexal\SteppedForm\Step\StepInterface(only when it has static steps);form_settings- contains FormSettings class or service alias that provides form settings. Must implementLexal\SteppedForm\FormSettings\FormSettingsInterface;storage- contains Storage class or service alias that provides form storage. Must implementLexal\SteppedForm\Storage\StorageInterface;session_key_storage(optional) - class or service id to use for storing a per-user session key that identifies which form session the current user is working with. Default:Lexal\\SteppedForm\\Form\\Storage\\NullSessionKeyStorage(no per-user session key). Provide an implementation (for example, a session-backed storage) when you need to isolate multiple concurrent form sessions per user or to resume a specific form session. Must implementLexal\SteppedForm\Storage\SessionKeyStorageInterface;
Usage
-
Configure your form settings.
- Declare form definitions in YAML or XML (deprecated since Symfony 7.4).
-
Inject and use the form in your controller. Form is available in the Symfony container as
stepped_form.form.<form_name>.CustomerController.php
License
Symfony Stepped Form is licensed under the MIT License. See LICENSE for the full license text.
All versions of symfony-stepped-form with dependencies
lexal/http-stepped-form Version ^4.0
symfony/config Version ^6.4 || ^7.4 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.4 || ^8.0
symfony/event-dispatcher-contracts Version ^3.7
symfony/http-foundation Version ^6.4.41 || ^7.4.13 || ^8.0.13
symfony/http-kernel Version ^6.4 || ^7.4.12 || ^8.0.12