2017 © Pedro Peláez
 

silverstripe-vendormodule silverstripe-sectioned-gridfield

Add sub grids to your gridfields.

image

ucenna/silverstripe-sectioned-gridfield

Add sub grids to your gridfields.

  • Friday, April 13, 2018
  • by Ucenna
  • Repository
  • 0 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Silverstripe-Sectioned-Grid-Field

Requirements

Installation

composer require ucenna/silverstripe-sectioned-gridfield, (*1)

Usage

Sectioned GridField extends the GridField class, albiet with added functionality to allow components to modify//expand grid rows. Configuration is more or less the same between the two., (*2)

$fields->addFieldToTab('Root.Regions', SectionedGridField::create(
 'Regions',
 'Region',
 $this->Regions(),
 new GridFieldConfig_ManyEditor('Items')
));

GridFieldConfig_ManyEditor

GridFieldConfig_ManyEditor is a GridFieldConfig that implements the GridFieldSubGrid component and takes a $has_many or many_many to parse into a child GridField. It can optionally be passed a GridFieldConfig that will be used to parse the child GridField like so: new GridFieldConfig_ManyEditor('Items', new GridFieldConfig_RecordEditor(). If no GridFieldConfig is specified, GridFieldConfig_Min will be used by default., (*3)

Example Image, (*4)

GridFieldSubGrid

GridFieldSubGrid is a component that opens up a grid's childfield and spreads it out into it's own contained gridfield. It can be added to prebuilt GridFieldConfigs such as GridFieldConfig_Base and GridFieldConfig_RecordEditor or used to create a new GridFieldConfig., (*5)

$config->addComponent(new GridFieldSubGrid('Field to Expand'[, GridFieldConfig]));

GridFieldSubGrid takes the name of a field item to expand, and optionally a GridFieldConfig to expand that field item into. If no GridFieldConfig is specified, GridFieldConfig_Min will be used by default., (*6)

GridFieldConfig_Min

Is a mini GridFieldConfig designed to work well with GridFieldSubGrid. Alternate GridFieldConfigs can be used in it's place, but they may not be formatted as well., (*7)

Limitations

Currently, GridFieldSubGrid doesn't play nice with sorting and filter components such as GridFieldSortableHeader. Those components are still accessible and still work with GridFieldSubGrid, in fact GridFieldConfig_Min and GridFieldConfig_ManyEditor use them, but their sort and filter functions have been disabled. I may fix them later on if I can figure out a way to implement them., (*8)

The Versions

13/04 2018

dev-master

9999999-dev

Add sub grids to your gridfields.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe gridfield

13/04 2018

0.6.0

0.6.0.0

Add sub grids to your gridfields.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe gridfield

13/04 2018

0.8.0

0.8.0.0

Add sub grids to your gridfields.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe gridfield