mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Merge pull request #48 from open-sausages/pulls/get-off-my-gridfield
Add a tab with 2 gridfields, one after the other
This commit is contained in:
commit
87b77e5551
@ -54,6 +54,18 @@ class GridFieldTestPage extends TestPage
|
||||
$fields->addFieldToTab('Root.ManyMany', $grid);
|
||||
$grids[] = $grid;
|
||||
|
||||
$config = new GridFieldConfig_RelationEditor();
|
||||
$grid = new GridField('HasManyCompaniesStacked', 'HasManyCompanies', $this->HasManyCompanies(), $config);
|
||||
$grid->setDescription('Records are owned by the page, so should auto-publish');
|
||||
$fields->addFieldToTab('Root.Stacked', $grid);
|
||||
$grids[] = $grid;
|
||||
|
||||
$config = new GridFieldConfig_RelationEditor();
|
||||
$grid = new GridField('ManyManyCompaniesStacked', 'ManyManyCompanies', $this->ManyManyCompanies(), $config);
|
||||
$grid->setDescription('Records are NOT owned by the page, and need to be individually published');
|
||||
$fields->addFieldToTab('Root.Stacked', $grid);
|
||||
$grids[] = $grid;
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user