xini/silverstripe-matrixfieldgroup 问题修复 & 功能扩展

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

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

xini/silverstripe-matrixfieldgroup

最新稳定版本:1.0.0

Composer 安装命令:

composer require xini/silverstripe-matrixfieldgroup

包简介

Allows to add form fields in a table like div structure.

README 文档

README

This is an archived project and is no longer maintained. Please do not file issues or pull-requests against this repo. If you wish to continue to develop this code yourself, we recommend you fork it or contact us.

Adds a field group that lets you add form field in a table like div structure

Requirements

  • SilverStripe 3.1.*

Usage

Here an example of how to add the field table:

$matrixfield = MatrixFieldGroup::create("Finances")
	->setColumnHeaders(array(
		"Account",
		"Debit",
		"Credit"
	));
	
$objects = SomeObject::get();

foreach ($objects as $object) {
	// add row for each object
	$catalogueFields->addRow(
		$object->Title,
		NumericField::create('Debit['.$object->ID.']', $object->Title.': Debit')
			->addExtraClass('hiddenLabel'),
		NumericField::create('Credit['.$object->ID.']', $object->Title.': Credit')
			->addExtraClass('hiddenLabel')
	);
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-04-29