qoliber/m2-mediacleaner
最新稳定版本:1.0.4
Composer 安装命令:
composer require qoliber/m2-mediacleaner
包简介
README 文档
README
A Magento module for cleaning up media files.
Installation
Installation is via composer
composer require qoliber/m2-mediacleaner
After installing the package, run the following command:
php bin/magento setup:upgrade
Usage
To use this module, simply enable it in the Magento configuration (Qoliber > Media Cleaner) and set the desired cleaning options. The module will then run automatically according to the configured cron expression.
Cleaning command
php bin/magento qoliber:media:clean
Dry run mode
If you want to test the cleaning process without actually deleting the files, you can set the --dry-run option in the command:
php bin/magento qoliber:media:clean --dry-run
Adding cleaners
All cleaner classes must implement the Qoliber\MediaCleaner\Api\Cleaner\CleanerInterface interface.
You can add a custom cleaner by modifying di.xml:
<type name="Qoliber\MediaCleaner\Api\CleanerProviderInterface"> <arguments> <argument name="cleaners" xsi:type="array"> <item name="custom_cleaner" xsi:type="object">Foo\Bar\Cleaner\CustomCleaner</item> </argument> </arguments> </type>
统计信息
- 总下载量: 217
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-01