定制 wwwision/multifileupload 二次开发

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

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

wwwision/multifileupload

最新稳定版本:1.1.0

Composer 安装命令:

composer require wwwision/multifileupload

包简介

Example package providing a simple MultiFileUpload element for the Neos.Form framework

README 文档

README

Example package providing a simple MultiFileUpload element for the Neos.Form framework.

DISCLAIMER

This package is not meant to be used in production but rather serves as basis implementation. Feel free to copy (parts of the) implementation and adjust it to your needs.

Usage

As mentioned above, this package is meant as inspiration and source for copy/paste. If you want to test it out, you can however install it as-is of course:

  1. Install package via composer require wwwision/multifileupload
  2. Configure your form preset to include a definition for the new element:
Neos:
  Form:
    presets:
      'default':
        formElementTypes:
          'Wwwision.Form.MultiFileUpload:MultiFileUpload':
            superTypes:
              'Neos.Form:FormElement': true
            implementationClassName: Wwwision\Form\MultiFileUpload\FormElements\MultiFileUpload
            properties:
              allowedExtensions:
                - pdf
                - doc

3a. Include the element in a form factory:

    public function build(array $factorySpecificConfiguration, $presetName) {
        $formConfiguration = $this->getPresetConfiguration($presetName);
        $form = new FormDefinition('someForm', $formConfiguration);

        $page1 = $form->createPage('page1');

        // ...

        $files = $page1->createElement('files', 'Wwwision.Form.MultiFileUpload:MultiFileUpload');
        $files->setLabel('Some Files');

        return $form;
    }

3b. Or within a form definition file:

type: 'Neos.Form:Form'
identifier: someForm
label: 'Some Form'
renderingOptions:
  submitButtonLabel: 'Send'
renderables:
  - type: 'Neos.Form:Page'
    identifier: page1
    renderables:
      - type: 'Wwwision.Form.MultiFileUpload:MultiFileUpload'
        identifier: files
        label: 'Some Files'

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-01-14