becklyn / rad
RAD related functionality for usage in Symfony.
Installs: 9 360
Dependents: 4
Suggesters: 1
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.4
- ext-json: *
- beberlei/doctrineextensions: ^1.3.0
- becklyn/rad-bundles: ^1.1.0
- doctrine/doctrine-bundle: ^2.3.2
- doctrine/orm: ^2.10.3
- psr/log: ^1.1.4
- scienta/doctrine-json-functions: ^4.5.0 || ^5.0.0
- symfony/config: ^5.4.3 || ^6.0.3
- symfony/dependency-injection: ^5.4.3 || ^6.0.3
- symfony/form: ^5.4.3 || ^6.0.3
- symfony/http-kernel: ^5.4.3 || ^6.0.4
- symfony/property-access: ^5.4.3 || ^6.0.3
- symfony/translation-contracts: ^v2.5.0 || ^v3.0.0
- symfony/validator: ^5.4.3 || ^6.0.3
- twig/twig: ^v3.3.4
Requires (Dev)
- algolia/search-bundle: ^5.2.1 || ^6.0.0
- roave/security-advisories: dev-master
- symfony/phpunit-bridge: ^5.4.3 || ^6.0.3
- symfony/twig-bridge: ^5.4.3 || ^6.0.3
Suggests
- symfony/twig-bridge: To use the default form theme.
Conflicts
README
This bundle provides RAD related functionality for the usage in Symfony.
⚠️ New Composer package name
This bundle has been renamed from becklyn/rad-bundle
to becklyn/rad
for v8.0. Versions <=7.x are still available under becklyn/rad-bundle
.
AJAX Protocol
This bundle uses a default AJAX protocol, that is used in the AjaxResponseBuilder
and can be used for your
project. The ajax call will always return an error 200, as it shouldn't flood the error tracking (with error 400
AJAX request).
The protocol looks like this:
interface AjaxResponse { /** * Whether the call succeeded. */ ok: boolean; /** * Any string status, like "ok" or "invalid-id" that * you can react to in your code (if you need to). */ status: string; /** * The response data. */ data: Record<number|string, any> | Array<any>; /** * A redirect target, where the AJAX handler should * redirect to. */ redirect?: string; /** * A toast message with optional type and action target. */ message?: { text: string; impact: "positive" | "negative" | "neutral"; action?: { label: string; url: string; }; }; }
There is a corresponding fetch client implementation in mojave
that can be used.
This type above is also available as generic TypeScript type in mojave
.
Form Extensions
This bundle automatically adds several form extensions.
Collection Labels Extension
This extension adds three additional optional labels for Collection
form fields:
empty_message
is displayed if there is no entry.entry_add_label
is the label of the "add entry" button.entry_remove_label
is the label of every "remove entry" button.