Note
This bundle uses symfony flex recipes to install further files via composer. Please check that flex is already configured in your project as it is part of the installation.
$ composer require enhavo/media-bundle ^0.8
Add following lines to assets/enhavo/registry/form.ts
// import statement
import MediaFormRegistryPackage from "@enhavo/media/FormRegistryPackage";
// register the package
this.registerPackage(new MediaFormRegistryPackage(application));
Add following entrypoint to the enhavo section in webpack.config.js
file.
// import
const MediaPackage = require('@enhavo/media/Encore/EncoreRegistryPackage');
// register package
.register(new MediaPackage());
If you want to display the media library in your application you can change your config/packages/enhavo.yaml
file.
enhavo_app:
menu:
media_library:
type: media_library
Execute following commands to upgrade your database.
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
Execute following commands to build your asset files.
$ yarn encore dev
% yarn routes:dump