{"id":22278863,"url":"https://github.com/ayman-benmada/sylius-media-plugin","last_synced_at":"2025-07-20T13:36:59.821Z","repository":{"id":237792756,"uuid":"795250263","full_name":"ayman-benmada/Sylius-Media-Plugin","owner":"ayman-benmada","description":"The Media plugin provides a library to manage your media","archived":false,"fork":false,"pushed_at":"2024-05-12T19:28:26.000Z","size":1845,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T02:03:41.037Z","etag":null,"topics":["library","media","sylius","sylius-plugin","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayman-benmada.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T22:09:42.000Z","updated_at":"2024-11-04T09:55:53.000Z","dependencies_parsed_at":"2024-05-03T07:10:58.454Z","dependency_job_id":null,"html_url":"https://github.com/ayman-benmada/Sylius-Media-Plugin","commit_stats":null,"previous_names":["ayman-benmada/sylius-media-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ayman-benmada/Sylius-Media-Plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayman-benmada%2FSylius-Media-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayman-benmada%2FSylius-Media-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayman-benmada%2FSylius-Media-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayman-benmada%2FSylius-Media-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayman-benmada","download_url":"https://codeload.github.com/ayman-benmada/Sylius-Media-Plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayman-benmada%2FSylius-Media-Plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135014,"owners_count":23881774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","media","sylius","sylius-plugin","symfony"],"created_at":"2024-12-03T15:16:54.214Z","updated_at":"2025-07-20T13:36:59.791Z","avatar_url":"https://github.com/ayman-benmada.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eSylius Media Plugin\u003c/h1\u003e\n\n\u003cp\u003e\n    The Media plugin provides a library to manage your media\n\u003c/p\u003e\n\n![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-1.png?raw=true)\n![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-2.png?raw=true)\n![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-3.png?raw=true)\n![presentation photo](https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/src/Resources/public/presentation-4.png?raw=true)\n\n## Example\n\nHere you will find \u003cstrong\u003e\u003ca href=\"https://github.com/ayman-benmada/Sylius-Media-Plugin/blob/main/docs/example.md\"\u003eexample\u003c/a\u003e\u003c/strong\u003e that allow you to add media to any form.\n\n## Installation\n\nRequire plugin with composer :\n\n```bash\ncomposer require abenmada/sylius-media-plugin\n```\n\nChange your `config/bundles.php` file to add the line for the plugin :\n\n```php\n\u003c?php\n\nreturn [\n    //..\n    Abenmada\\MediaPlugin\\MediaPlugin::class =\u003e ['all' =\u003e true],\n]\n```\n\nThen create the config file in `config/packages/abenmada_media_plugin.yaml` :\n\n```yaml\nimports:\n    - { resource: \"@MediaPlugin/Resources/config/services.yaml\" }\n```\n\nThen import the routes in `config/routes/abenmada_media_plugin.yaml` :\n\n```yaml\nabenmada_media_plugin_routing:\n    resource: \"@MediaPlugin/Resources/config/routes.yaml\"\n    prefix: /%sylius_admin.path_name%\n```\n\nUpdate the entity `src/Entity/Channel/Channel.php` :\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Entity\\Channel;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Abenmada\\MediaPlugin\\Model\\Channel\\ChannelTrait as AbenmadaMediaChannelTrait;\nuse Sylius\\Component\\Core\\Model\\Channel as BaseChannel;\n\n/**\n * @ORM\\Entity\n * @ORM\\Table(name=\"sylius_channel\")\n */\nclass Channel extends BaseChannel\n{\n    use AbenmadaMediaChannelTrait;\n\n    public function __construct()\n    {\n        $this-\u003emedias = new ArrayCollection();\n        parent::__construct();\n    }\n}\n```\n\nRun the migration :\n```bash\nbin/console doctrine:migration:migrate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayman-benmada%2Fsylius-media-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayman-benmada%2Fsylius-media-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayman-benmada%2Fsylius-media-plugin/lists"}