<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webbuilders-group / silverstripe-gridfielditemtype example snippets
use WebbuildersGroup\GridField\ItemType\AddNewItemTypeButton;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
$config = GridFieldConfig_RecordEditor::create(10);
->removeComponentsByType('GridFieldAddNewButton::class)
->removeComponentsByType(GridFieldDetailForm::class)
->addComponent(new AddNewItemTypeButton($yourOptionsMap, 'buttons-before-left', 'empty string', 'default'))
->addComponent(new ItemTypeDetailForm());
use WebbuildersGroup\GridField\ItemType\AddNewItemTypeButton;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
$config=GridFieldConfig_Base::create(10);
$config->addComponent(new AddNewItemTypeButton($yourOptionsMap, 'buttons-before-left'));
$config->addComponent(new ItemTypeDetailForm());
use WebbuildersGroup\GridField\ItemType\VersionedItemTypeDetailForm_ItemRequest;
$detailForm->setItemRequestClass(VersionedItemTypeDetailForm_ItemRequest::class);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.