定制 qoliber/m2-mediacleaner 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-01