monsieurbiz/sylius-media-manager-plugin
Composer 安装命令:
composer require monsieurbiz/sylius-media-manager-plugin
包简介
Add a media manager to your Sylius.
README 文档
README
Sylius Media Manager
This plugin adds a media manager to your images, videos and other files type fields in Sylius.
Compatibility
| Sylius Version | PHP Version |
|---|---|
| 2.0, 2.1 | 8.2 - 8.3 |
ℹ️ For Sylius 1.x, see our 1.x branch and all 1.x releases.
Installation
If you want to use our recipes, you can configure your composer.json by running:
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
Install the plugin via composer:
composer require monsieurbiz/sylius-media-manager-plugin
Change your config/bundles.php file to add this line for the plugin declaration:
<?php return [ //.. MonsieurBiz\SyliusMediaManagerPlugin\MonsieurBizSyliusMediaManagerPlugin::class => ['all' => true], ];
Copy the plugin configuration files in your config folder: https://github.com/monsieurbiz/symfony-recipes/tree/master/monsieurbiz/sylius-media-manager-plugin/3.0/config
Add these variables to your .env :
MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_PUBLIC_FOLDER=%kernel.project_dir%/public
MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_ROOT_FOLDER_FROM_PUBLIC=media
MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_MAX_FILE_SIZE=5M
Copy the templates in the folder dist/templates/ to ensure that form fields are rendered correctly:
cp -R vendor/monsieurbiz/sylius-media-manager-plugin/dist/templates/bundles/* templates/bundles/
Copy the form extension if you want to use it on your product images.
cp -R vendor/monsieurbiz/sylius-media-manager-plugin/dist/src/Form/Extension/ProductImageTypeExtension.php src/Form/Extension/ProductImageTypeExtension.php
Else remove the file templates/bundles/SyliusAdminBundle/product/form/sections/media/images.html.twig
Use form types
You can check the dist folder to check how the plugin is setup on the test application.
Images
Use MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\ImageType
Use MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\PdfType
Video
Use MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\VideoType
Favicon
Use MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\FaviconType
Audio
Use MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\AudioType
Configuration
You can specify the default maximum file size allowed for the media manager by setting the MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_MAX_FILE_SIZE environment variable.
Is it possible to define a maximum file size for each form type by define the MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_MAX_FILE_SIZE_{TYPE} environment variable.
Example: MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_MAX_FILE_SIZE_IMAGE=1M will set the maximum file size for the image type to 1M.
Contributing
You can find a way to run the plugin without effort in the file DEVELOPMENT.md.
Then you can open an issue or a Pull Request if you want! 😘
Thank you!
License
This plugin is completely free and released under the MIT License.
monsieurbiz/sylius-media-manager-plugin 适用场景与选型建议
monsieurbiz/sylius-media-manager-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 95.65k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2022 年 12 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sylius」 「sylius-plugin」 「monsieurbiz」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 monsieurbiz/sylius-media-manager-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 monsieurbiz/sylius-media-manager-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 monsieurbiz/sylius-media-manager-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of the Omnibus Directive for Sylius application.
A simple plugin to have sales reports in Sylius
Adds a simple message on top of your shop.
Bulk export of sylius resources
Sylius plugin that integrates Addwish
Setono example plugin for Sylius.
统计信息
- 总下载量: 95.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 28
- 依赖项目数: 5
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-05

