Installation
sh
composer require janalis/easyadmin-embedded-listWithout Symfony Flex, enable the bundle in config/bundles.php:
php
return [
// ...
Janalis\EasyAdminEmbeddedList\EasyAdminEmbeddedListBundle::class => ['all' => true],
];The bundle needs no configuration: the defaults are listed in Configuration.
The script
EmbeddedListField adds the script to the pages that show the field, as a module served by AssetMapper (@janalis/easyadmin-embedded-list/embedded-list.js). It has no imports, so nothing goes in your import map.
To use its events from your own modules, import it from your import map:
php
// importmap.php
return [
// ...
'@janalis/easyadmin-embedded-list/embedded-list.js' => [
'path' => '@janalis/easyadmin-embedded-list/embedded-list.js',
],
];The browser loads a module once per URL, so the field's tag and your import share one instance.