定制 silvercommerce/versionhistoryfield 二次开发

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

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

silvercommerce/versionhistoryfield

最新稳定版本:1.1.1

Composer 安装命令:

composer require silvercommerce/versionhistoryfield

包简介

Field that hows a simple version history of a versioned DataObject.

README 文档

README

Scrutinizer Code Quality

Simple field that lists changes made to an associated "Versioned" DataObject

Designed to be used with SilverCommerce Estimates, Invoices and contacts, but should work equally well with any other DataObject

Installing

Install via composer:

composer require silvercommerce/versionhistoryfield

Then flush

Usage

You can add this field to any form that represents a DataObject that uses Versioned. It will output a simple list of changes. For example, to add to YourObject::getCMSFields() use:

class YourDataObject extends DataObject
{
    ...

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab(
            "Root.History",
            VersionHistoryField::create(
                "History",
                _t("SilverCommerce\VersionHistoryField.History", "History"),
                $this
            )->addExtraClass("stacked") // make the field full width
        );

        return $fields;
    }

    ...
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-04-28