mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Remove DataModel and Object to work with SS4 (#148)
This commit is contained in:
parent
5d8a1c3abd
commit
fc86512ec9
@ -10,7 +10,6 @@ use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||
use SilverStripe\ORM\DataModel;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use SilverStripe\View\Requirements;
|
||||
|
||||
@ -368,7 +367,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
||||
//print_r('matched ' . $handlerClass . ' to ' . $rule);
|
||||
$handler = Injector::inst()->create($handlerClass, $gridField, $this, $controller);
|
||||
|
||||
return $handler->handleRequest($request, DataModel::inst());
|
||||
return $handler->handleRequest($request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ use SilverStripe\Dev\Deprecation;
|
||||
use SilverStripe\Forms\FormAction;
|
||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||
use SilverStripe\ORM\DataModel;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use SilverStripe\View\Requirements;
|
||||
@ -466,6 +465,6 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
||||
$controller = $gridField->getForm()->getController();
|
||||
$handler = new \Colymba\BulkUpload\BulkUploaderRequest($gridField, $this, $controller);
|
||||
|
||||
return $handler->handleRequest($request, DataModel::inst());
|
||||
return $handler->handleRequest($request);
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class BulkUploaderRequest extends RequestHandler
|
||||
// 1. DataObject
|
||||
//create record
|
||||
$recordClass = $this->component->getRecordClassName($this->gridField);
|
||||
$record = Object::create($recordClass);
|
||||
$record = $recordClass::create();
|
||||
$record->write();
|
||||
|
||||
// passes the current gridfield-instance to a call-back method on the new object
|
||||
|
Loading…
Reference in New Issue
Block a user