wedevelopnl/silverstripe-gridfieldsitetreebuttons

There is no license information available for the latest version (1.0.2) of this package.

Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings). Simple alternative for versionedgridfield.

1.0.2 2024-01-18 11:21 UTC

This package is auto-updated.

Last update: 2024-12-18 13:23:34 UTC


README

Modifies GridFields & GridField detail forms to use standard page edit form (with versioning, history & settings).

Requirements

  • See composer.json requirements

Installation

composer require wedevelopnl/silverstripe-gridfieldsitetreebuttons

After installation, run a dev/build with flush to complete the installation

Usage

In GridFieldConfig, replace GridFieldAddNewButton('toolbar-header-right') with GridFieldAddNewSiteTreeItemButton('toolbar-header-right') and new GridFieldDetailForm() with GridFieldEditSiteTreeItemButton()

Example

$gridFieldConfig = GridFieldConfig_RecordEditor::create();
$gridFieldConfig->removeComponentsByType(GridFieldAddNewButton::class);
$gridFieldConfig->addComponent(new GridFieldAddNewSiteTreeItemButton('toolbar-header-right'));
$gridFieldConfig->removeComponentsByType(GridFieldAddNewButton::class);
$gridFieldConfig->addComponent(new GridFieldEditSiteTreeItemButton());

License

See License

Maintainers

Development and contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
See read our contributing document for more information.

Development and contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See read our contributing document for more information.