osw3/symfony-media 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

osw3/symfony-media

最新稳定版本:0.0.29

Composer 安装命令:

composer require osw3/symfony-media

包简介

Manage media of your app.

README 文档

README

Add media manager to your app pages.

How to install

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require osw3/symfony-media

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    OSW3\Media\MediaBundle::class => ['all' => true],
];

How to use

How to configure

dependencies

Install deps if you need to process :

Image:

composer require claviska/simpleimage

Audio:

composer require james-heinrich/getid3

Video:

composer require php-ffmpeg/php-ffmpeg

PDF:

composer require setasign/fpdf
composer require setasign/fpdi

Create Entity

bin/console make:entity Media

Valid the entity without properties and replace Entity class

use OSW3\Media\Trait\Entity\MediaTrait;

#[ORM\Entity(repositoryClass: MediaRepository::class)]
class Media
{
    use MediaTrait;
}
#config/package/twig_component.yaml
twig_component:
    defaults:
        OSW3\Media\Components\: '@Media/'

PROCESSOR: Deinir la classe du processor dans la partie presets de config.yaml

Ajouter la classe au service

service:    
    # App\Processor\TestProcessor:
    #     autowire: true
    #     autoconfigure: true
    #     public: true
    App\Processor\:
        resource: '../src/Processor/'
        autowire: true
        autoconfigure: true
        public: true
        # tags: ['app.processor']

统计信息

  • 总下载量: 44
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-13