Adds type/class picking functionality to SilverStripe 3.0's GridField


Repository: https://github.com/webbuilders-group/silverstripe-gridfielditemtype

Packagist: http://packagist.org/packages/webbuilders-group/silverstripe-gridfielditemtype

Issues: https://github.com/webbuilders-group/silverstripe-gridfielditemtype/issues

Authors: Ed Chipman

6 1 101


Readme

GridFieldItemType

Adds type/class picking functionality to SilverStripe 3.0's GridField. Use the 3.0 branch for compatability with SilverStripe 3.0.

Maintainer Contact

Requirements

  • SilverStripe 3.1.0+

Installation

  • Download the module from here https://github.com/webbuilders-group/silverstripe-gridfielditemtype/archive/master.zip
  • Extract the downloaded archive into your site root so that the destination folder is called GridFieldItemType, opening the extracted folder should contain _config.php in the root along with other files/folders
  • Run dev/build?flush=all to regenerate the manifest
  • Upon entering the cms and using GridFieldItemType components for the first time you make need to add ?flush=all to the end of the address to force the templates to regenerate

Usage

If you are working with one of the pre-configured GridFieldConfigs you must first remove the default GridFieldDetailForm and GridFieldAddNewButton components replacing them with ItemTypeDetailForm and AddNewItemTypeButton respectively

$config=GridFieldConfig_RecordEditor::create(10);
$config->removeComponentsByType('GridFieldAddNewButton');
$config->removeComponentsByType('GridFieldDetailForm');
$config->addComponent(new AddNewItemTypeButton($yourOptionsMap, 'buttons-before-left'));
$config->addComponent(new ItemTypeDetailForm());

If you are using the base GridField config you need to add both the AddNewItemTypeButton and ItemTypeDetailForm to your config

$config=GridFieldConfig_Base::create(10);
$config->addComponent(new AddNewItemTypeButton($yourOptionsMap, 'buttons-before-left'));
$config->addComponent(new ItemTypeDetailForm());

Note: All options in the type dropdown must be decendents of the model class.


Versions

dev-master
2017-05-12 4:29pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype dev-master

Manual Install: Download

Requires
  • composer/installers: *
  • silverstripe/framework: ~3.1
3.0.x-dev
2013-12-17 4:19pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 3.0.x-dev

Manual Install: Download

Requires
  • silverstripe/framework: 3.0.*
  • composer/installers: *
0.4.0
2017-05-12 4:29pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.4.0

Manual Install: Download

Requires
  • silverstripe/framework: ~3.1
  • composer/installers: *
0.3.0
2016-02-03 2:27pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.3.0

Manual Install: Download

Requires
  • silverstripe/framework: 3.1.*
  • composer/installers: *
0.2.1
2014-04-15 8:11pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.2.1

Manual Install: Download

Requires
  • silverstripe/framework: 3.1.*
  • composer/installers: *
0.1.3
2013-10-30 2:16pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.1.3

Manual Install: Download

Requires
  • silverstripe/framework: 3.0.*
  • composer/installers: *
0.2.0
2013-10-30 2:14pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.2.0

Manual Install: Download

Requires
  • silverstripe/framework: 3.1.*
  • composer/installers: *
0.1.2
2013-09-09 1:08pm UTC
BSD-3-Clause

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.1.2

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *
0.1.1
2013-08-22 7:05pm UTC
Unknown

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.1.1

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *
0.1.0
2013-07-26 3:02pm UTC
Unknown

Install composer require webbuilders-group/silverstripe-gridfielditemtype 0.1.0

Manual Install: Download

Requires
  • silverstripe/framework: 3.*
  • composer/installers: *