Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ayman-benmada/sylius-media-plugin

The Media plugin provides a library to manage your media
https://github.com/ayman-benmada/sylius-media-plugin

library media sylius sylius-plugin symfony

Last synced: 25 days ago
JSON representation

The Media plugin provides a library to manage your media

Awesome Lists containing this project

README

        

Sylius Media Plugin


The Media plugin provides a library to manage your media

![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-1.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-2.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-3.png?raw=true)
![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-4.png?raw=true)

## Example

Here you will find example that allow you to add media to any form.

## Installation

Require plugin with composer :

```bash
composer require abenmada/sylius-media-plugin
```

Change your `config/bundles.php` file to add the line for the plugin :

```php
['all' => true],
]
```

Then create the config file in `config/packages/abenmada_media_plugin.yaml` :

```yaml
imports:
- { resource: "@MediaPlugin/Resources/config/services.yaml" }
```

Then import the routes in `config/routes/abenmada_media_plugin.yaml` :

```yaml
abenmada_media_plugin_routing:
resource: "@MediaPlugin/Resources/config/routes.yaml"
prefix: /%sylius_admin.path_name%
```

Update the entity `src/Entity/Channel/Channel.php` :

```php
medias = new ArrayCollection();
parent::__construct();
}
}
```

Run the migration :
```bash
bin/console doctrine:migration:migrate
```