API CHANGE: Renaming of gridfield components #6921

This commit is contained in:
Stig Lindqvist 2012-03-09 12:53:27 +13:00
parent d37bd9d306
commit 8aa60c207f
2 changed files with 15 additions and 15 deletions

View File

@ -38,13 +38,13 @@ class Company extends DataObject {
$fields->add(new TextField('CEO', 'CEO', $this->CEO));
$config = new GridFieldConfig();
$config->addComponent(new GridFieldRelationAdd('Name'));
$config->addComponent(new GridFieldAddExistingAutocompleter('Name'));
$config->addComponent(new GridFieldDefaultColumns());
$config->addComponent(new GridFieldSortableHeader());
$config->addComponent(new GridFieldPaginator());
$config->addComponent(new GridFieldDeleteAction());
$config->addComponent(new GridFieldRelationDelete());
$config->addComponent(new GridFieldPopupForms());
$config->addComponent(new GridFieldRemoveButton());
$config->addComponent(new GridFieldDetailForm());
$gridField = new GridField('Employees', 'Employees', $this->Employees(), $config);
$fields->add($gridField);

View File

@ -35,10 +35,10 @@ class GridFieldTestPage extends Page {
$config->addComponent(new GridFieldDefaultColumns());
$config->addComponent(new GridFieldSortableHeader());
$config->addComponent(new GridFieldPaginator);
$config->addComponent(new GridFieldFilter());
$config->addComponent(new GridFieldFilterHeader());
$config->addComponent(new GridFieldDeleteAction());
$config->addComponent(new GridFieldEditAction());
$config->addComponent($forms = new GridFieldPopupForms());
$config->addComponent(new GridFieldEditButton());
$config->addComponent($forms = new GridFieldDetailForm());
$grid = new GridField('Companies', 'Companies', new DataList('Company'),$config);
$fields->addFieldToTab('Root.NoRelation', $grid);
@ -46,10 +46,10 @@ class GridFieldTestPage extends Page {
$config->addComponent(new GridFieldDefaultColumns());
$config->addComponent(new GridFieldSortableHeader());
$config->addComponent(new GridFieldPaginator);
$config->addComponent(new GridFieldFilter());
$config->addComponent(new GridFieldFilterHeader());
$config->addComponent(new GridFieldDeleteAction());
$config->addComponent(new GridFieldEditAction());
$config->addComponent(new GridFieldRelationAdd('Name'));
$config->addComponent(new GridFieldEditButton());
$config->addComponent(new GridFieldAddExistingAutocompleter('Name'));
$grid = new GridField('HasManyCompanies', 'HasManyCompanies', new DataList('Company'),$config);
$fields->addFieldToTab('Root.HasMany', $grid);
@ -57,10 +57,10 @@ class GridFieldTestPage extends Page {
$config->addComponent(new GridFieldDefaultColumns());
$config->addComponent(new GridFieldSortableHeader());
$config->addComponent(new GridFieldPaginator);
$config->addComponent(new GridFieldFilter());
$config->addComponent(new GridFieldFilterHeader());
$config->addComponent(new GridFieldDeleteAction());
$config->addComponent(new GridFieldEditAction());
$config->addComponent(new GridFieldRelationAdd('Name'));
$config->addComponent(new GridFieldEditButton());
$config->addComponent(new GridFieldAddExistingAutocompleter('Name'));
$grid = new GridField('ManyManyCompanies', 'ManyManyCompanies', new DataList('Company'),$config);
$fields->addFieldToTab('Root.ManyMany', $grid);
@ -90,10 +90,10 @@ class GridFieldTestPage_Controller extends Page_Controller {
$config->addComponent(new GridFieldDefaultColumns());
$config->addComponent(new GridFieldSortableHeader());
$config->addComponent(new GridFieldPaginator);
$config->addComponent(new GridFieldFilter());
$config->addComponent(new GridFieldFilterHeader());
$config->addComponent(new GridFieldDeleteAction());
$config->addComponent(new GridFieldEditAction());
$config->addComponent(new GridFieldPopupForms());
$config->addComponent(new GridFieldEditButton());
$config->addComponent(new GridFieldDetailForm());
$grid = new GridField('Companies', 'Companies', new DataList('Company'),$config);
return new Form($this,'Form',new FieldList($grid),new FieldList());