bywatersolutions/silverstripe-jsoneditorfield 问题修复 & 功能扩展

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

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

bywatersolutions/silverstripe-jsoneditorfield

Composer 安装命令:

composer require bywatersolutions/silverstripe-jsoneditorfield

包简介

JSON Editor Field for Silverstripe

README 文档

README

Add a JSON Schema-based Editor to SilverStripe. Uses JSON Editor to build an interactive form for building JSON that's valid according to a provided schema.

Installation

composer require bywatersolutions/silverstripe-jsoneditorfield

Usage

use ByWaterSolutions\JsonEditorField\JsonEditorField;

...

private static $db = array[
    'MyJson' => 'Text'
];

public function getCMSFields() {
    $fields = parent::getCMSFields();
    $schema = file_get_contents("path/to/your/schema.json");
    $fields->addFieldToTab("Root.Main", new JsonEditorField("MyJson", "My JSON Document", $this->MyJson, null, $schema));
    return $fields;
}

It's that easy! Of course, you still have to write the JSON Schema and make sure it's valid.... check the console on your browser if you're not getting the form you expected.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 6
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2019-11-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固