mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
Add a tab with 2 gridfields, one after the other
This commit is contained in:
parent
fe4aa6e623
commit
9909f97f81
@ -54,6 +54,18 @@ class GridFieldTestPage extends TestPage
|
|||||||
$fields->addFieldToTab('Root.ManyMany', $grid);
|
$fields->addFieldToTab('Root.ManyMany', $grid);
|
||||||
$grids[] = $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;
|
return $fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user