定制 heimrichhannot/contao-multi-column-editor-bundle 二次开发

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

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

heimrichhannot/contao-multi-column-editor-bundle

Composer 安装命令:

composer require heimrichhannot/contao-multi-column-editor-bundle

包简介

This module offers an input type for editing one or more records in frontend and backend.

README 文档

README

This module offers an input type for editing one or more records in backend and frontend.

alt text

Features

  • input type to edit one or multiple records
  • support for backend and frontend
  • Encore bundle support

Install

Install with composer:

composer require heimrichhannot/contao-multi-column-editor-bundle

Technical instructions

Use the inputType "multiColumnEditor" for your field.

Minimal example:

$GLOBALS['TL_DCA']['tl_my_table']['fields']['mce_field'] = [
    'inputType' => 'multiColumnEditor',
    'eval'      => [
        'multiColumnEditor' => [
            'fields' => [
                'field1' => [
                    'label' => &$GLOBALS['TL_LANG']['tl_my_table']['field1'],
                    'inputType' => 'text',
                    'eval' => ['groupStyle' => 'width:150px']
                ],
                'field2' => [
                    'label' => &$GLOBALS['TL_LANG']['tl_my_table']['field2'],
                    'inputType'               => 'select',
                    'options'                 => ['option1', 'option2'],
                    'eval' => ['groupStyle' => 'width:150px']
                ],
            ]
        ]
    ],
    'sql'       => "blob NULL"
];

All available options

'someField' => [
    'label'     => &$GLOBALS['TL_LANG']['tl_my_table']['someField'],
    'inputType' => 'multiColumnEditor',
    'exclude'   => true,
    // add 'compact' to tl_class if you want to display a reduced version of MCE
    'tl_class'  => 'compact', 
    'eval'      => [
        'multiColumnEditor' => [
            // set to true if the rows should be sortable (backend only atm)
            'sortable' => true,
            'class' => 'some-class',
            // set to 0 if it should also be possible to have *no* row (default: 1)
            'minRowCount' => 2,
            // set to 0 if an infinite number of rows should be possible (default: 0)
            'maxRowCount' => 5,
            // defaults to false
            'skipCopyValuesOnAdd' => false,
            'editorTemplate' => 'multi_column_editor_backend_default',
            // Optional: add palette and subpalette if you need supalettes support (otherwise all fields will be shows)
            // Legends are supported since verison 2.8
            'palettes'    => [
                '__selector__' => ['field1'],
                'default'      => 'field1',
            ],
            'subpalettes' => [
                'field1'  => 'field2', // key selector
                'field1_10' => 'field3' // key_value selector
            ],
            // place your fields here as you would normally in your DCA
            // (sql is not required)
            'fields' => [
                
                'field1' => [
                    'label' => ['field 1', 'The description of field 1'],
                    'inputType' => 'text',
                    'eval' => ['groupStyle' => 'width:150px', 'submitOnChange' => true]
                ],
                'field2' => [
                    'label' => ['field 2', 'The description of field 2'],
                    'inputType' => 'text',
                    'eval' => ['groupStyle' => 'width:150px']
                ],
                'field3' => [
                    'label' => ['field 3', 'The description of field 3'],
                    'inputType' => 'text',
                    'eval' => ['groupStyle' => 'width:150px']
                ]
            ]
        ]
    ],
    'sql'       => "blob NULL"
],
Option Values Description
tl_class compact Display a reduced version of MCE.

Add support for special fields (like fileTrees) in Rocksolid Custom Content Elements (RSCE)

Simply add the following to your project's config.php:

$GLOBALS['MULTI_COLUMN_EDITOR']['rsce_fields'] = array_merge(
    is_array($GLOBALS['MULTI_COLUMN_EDITOR']['rsce_fields']) ? $GLOBALS['MULTI_COLUMN_EDITOR']['rsce_fields'] : [], [
        'tl_content' => ['linkImage']
    ]
);

where this would be your RSCE config:

$element = [
     // ...
    'fields'          => [
        'links'              => [
            'label'     => &$GLOBALS['TL_LANG']['tl_content']['links'],
            'inputType' => 'multiColumnEditor',
            'eval'      => [
                'tl_class'          => 'long clr',
                'multiColumnEditor' => [
                    'minRowCount' => 0,
                    'fields'      => [
                        'linkImage'     => [
                            // ...
                            'inputType'               => 'fileTree',
                        ],
    // ...

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 4
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2018-05-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固