定制 gurucomkz/doubleselectrelation 二次开发

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

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

gurucomkz/doubleselectrelation

最新稳定版本:v1.2.2

Composer 安装命令:

composer require gurucomkz/doubleselectrelation

包简介

Admin input with two selects

关键字:

README 文档

README

Old-fashioned component with left column with available options, right column with selected ones and some buttons to move elements between those. Has filter fields to look up for the elements in the columns.

Installation

composer require gurucomkz/doubleselectrelation
composer vendor-expose

Usage

$offersList = Offers::get();
$offersSelector = DoubleSelectRelation::create('Offers', null, $offersList);
$fields->addFieldToTab('Root.Main', $offersSelector);

Select custom Title

Declare a field (i.e. LongTitle) or a getter (i.e. getLongTitle()) in your model and do like this:

DoubleSelectRelation::create('Offers', null, $offersList)
    ->setTitleField('LongTitle');

Enable preview

You may want to let users check out the options before working with them. It can be done like this:

DoubleSelectRelation::create('Offers', null, $offersList)
    ->setAllowPreview(true);

It will create a button in every line, which by clicking will display a readonly CMS form in a modal box.

Additionally, you can declare method getPreviewCMSFields() in your related model to make a totally custom preview form.

TODO

  • Checks for changes and reporting to the form to trigger "Save" button activation
  • Some API maybe for programmatic control over options?

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-10-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固