agence-adeliom / easy-fields-bundle
A Symfony bundle for EasyAdmin that provide some fields
Installs: 11 701
Dependents: 8
Suggesters: 0
Security: 0
Stars: 11
Watchers: 2
Forks: 10
Open Issues: 7
Language:JavaScript
Type:symfony-bundle
Requires
- php: >=8.0.2
- ext-json: *
- easycorp/easyadmin-bundle: ^3.4 || ^v4.0
- embed/embed: ^4.2
- nyholm/psr7: ^1.4
- stof/doctrine-extensions-bundle: ^1.6
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/event-dispatcher: ^5.4 || ^6.0
- symfony/form: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/options-resolver: ^5.4 || ^6.0
- symfony/psr-http-message-bridge: ^2.0
- dev-main
- 3.x-dev
- 2.x-dev
- 2.0.122
- 2.0.121
- 2.0.120
- 2.0.119
- 2.0.118
- 2.0.117
- 2.0.116
- 2.0.115
- 2.0.114
- 2.0.112
- 2.0.111
- 2.0.110
- 2.0.109
- 2.0.108
- 2.0.107
- 2.0.106
- 2.0.105
- 2.0.104
- 2.0.103
- 2.0.102
- 2.0.101
- 2.0.100
- 2.0.99
- 2.0.98
- 2.0.97
- 2.0.96
- 2.0.95
- 2.0.94
- 2.0.93
- 2.0.92
- 2.0.91
- 2.0.90
- 2.0.89
- 2.0.88
- 2.0.87
- 2.0.86
- 2.0.85
- 2.0.84
- 2.0.83
- 2.0.82
- 2.0.81
- 2.0.80
- 2.0.79
- 2.0.78
- 2.0.77
- 2.0.76
- 2.0.75
- 2.0.74
- 2.0.73
- 2.0.72
- 2.0.71
- 2.0.70
- 2.0.69
- 2.0.68
- 2.0.67
- 2.0.66
- 2.0.65
- 2.0.64
- 2.0.63
- 2.0.62
- 2.0.61
- 2.0.60
- 2.0.59
- 2.0.57
- 2.0.56
- 2.0.55
- 2.0.54
- 2.0.53
- 2.0.52
- 2.0.49
- 2.0.48
- 2.0.47
- 2.0.46
- 2.0.45
- 2.0.44
- 2.0.43
- 2.0.42
- 2.0.41
- 2.0.40
- 2.0.39
- 2.0.38
- 2.0.37
- 2.0.36
- 2.0.35
- 2.0.34
- 2.0.33
- 2.0.32
- 2.0.31
- 2.0.30
- 2.0.29
- 2.0.28
- 2.0.27
- 2.0.26
- 2.0.25
- 2.0.24
- 2.0.23
- 2.0.22
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.10
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dependabot/npm_and_yarn/webpack-5.88.0
- dev-develop
This package is auto-updated.
Last update: 2024-11-29 10:56:26 UTC
README
Easy Fields Bundle
Provide some fields for Easyadmin.
Versions
Installation with Symfony Flex
Add our recipes endpoint
{ "extra": { "symfony": { "endpoint": [ "https://api.github.com/repos/agence-adeliom/symfony-recipes/contents/index.json?ref=flex/main", ... "flex://defaults" ], "allow-contrib": true } } }
Install with composer
composer require agence-adeliom/easy-fields-bundle
Documentation
AssociationField
Is an extension of EasyAdmin's AssociationField that allow you to create new object et select one from the curent page.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\AssociationField; // You have to add this form theme @EasyFields/form/association_widget.html.twig ... yield AssociationField::new('property', "label");
EnumField
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\EnumField; ... yield EnumField::new('property', "label") ->setEnum(YourEnumClass::class);
FormTypeField
This field is a custom integration that allow you to bind any raw form type to your admin.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\FormTypeField; ... yield FormTypeField::new('property', "label", YourFormTypeClass::class)
TranslationField
An A2lix TranslationFormBundle integration for EasyAdmin.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\TranslationField; // You have to add this form theme @EasyFields/form/translations_widget.html.twig ... yield TranslationField::new('property', "label", [ 'description' => [ 'field_type' => 'textarea', 'label' => 'descript.', 'locale_options' => [ 'es' => ['label' => 'descripciĆ³n'] 'fr' => ['display' => false] ] ] ])
ChoiceMaskField
An fork of Sonata's ChoiceMaskField for EasyAdmin.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\ChoiceMaskField; // You have to add this form theme @EasyFields/form/choice_mask_widget.html.twig ... yield ChoiceMaskField::new('property', "label") ->setChoices([ 'uri' => 'uri', 'route' => 'route', ]) // Associative array. Describes the fields that are displayed for each choice. ->setMap([ 'route' => ['route', 'parameters'], 'uri' => ['uri'], ]);
SortableCollectionField
Is an extension of EasyAdmin's CollectionField that allow you to sort entries.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\SortableCollectionField; // You have to add this form theme @EasyFields/form/sortable_widget.html.twig ... // NOTE : property can be a *ToMany or an array. yield SortableCollectionField::new('property', "label") ->setEntryType(YourEntryFromType::class) ->allowAdd() // Allow to add new entry ->allowDelete() // Allow to remove entries ->allowDrag() // Allow to drag entries ;
IconField
Is an icon picker.
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\IconField; // You have to add this form theme @EasyFields/form/icon_widget.html.twig ... yield IconField::new('property', "label") ->setJsonUrl($url) // Must be a public json file with an array of your icon's classes ->setFonts($fonts) // Must be an array of yours fonticon css file ->setSelectButtonLabel() // Change label ->setCancelButtonLabel() // Change label ->setShowAllButtonLabel() // Change label ->setSearchPlaceholder() // Change label ->setNotResultMessage() // Change label ->setDeleteLabel() ;
PositionSortableField
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\PositionSortableField; // You have to add this form theme @EasyFields/form/form-easy-field-position-sortable.html.twig ... yield PositionSortableField::new('property', "label");
OembedField
To use this field, you need to add the bundle specific routes:
# config/routes/easy_fields.yaml easy_fields: resource: '@EasyFieldsBundle/Resources/config/routes.xml' prefix: /
Usage
use Adeliom\EasyFieldsBundle\Admin\Field\OembedField; // You have to add this form theme @EasyFields/form/oembed_widget.html.twig ... yield OembedField::new('property', "label");
Twig render
# Get HTML code {{ property|oembed_html }} # Get Dimensions {{ property|oembed_size }}