定制 it-blaster/uploadable-bundle 二次开发

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

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

it-blaster/uploadable-bundle

最新稳定版本:v1.1.3

Composer 安装命令:

composer require it-blaster/uploadable-bundle

包简介

The extended Symfony's Form File Type based on it-blaster/uploadable-behavior

README 文档

README

Scrutinizer Code Quality Build Status License Total Downloads Latest Unstable Version Latest Stable Version

The extended Symfony's Form File Type based on it-blaster/uploadable-behavior.

It provides the ability to easily upload files, show links to them and display checkbox-controls for deletion them (only from database) in your forms.

Installation

Add it-blaster/uploadable-bundle to your composer.json file and run composer

...
"require": {
    "it-blaster/uploadable-bundle": "1.0.*"
}
...

Register the bundle in your AppKernel.php

...
new Fenrizbes\UploadableBundle\FenrizbesUploadableBundle(),
...

Configure it-blaster/uploadable-behavior

Usage

Now you can use the uploadable form type:

...
    ->add('MyFile', 'uploadable')
...

This type inherits all the file type's options (except constraints) and has own ones:

  • removable (boolean, default: true) - display or not the checkbox-control for deletion
  • remove_label (string, default: 'remove') - the label for checkbox-control (if it's enabled)
  • file_constraints (array, default: null) - constraints for the file field

Configuration

The bundle has an only parameter root_path that determines the path to the project's root directory. Default value is %kernel.root_dir%/../web. You can configure it in your config.yml as follows:

...
fenrizbes_uploadable:
    root_path: /your/own/path
...

TODO

  • Delete previously uploaded files

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-24