mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 09:05:57 +00: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_HTMLProvider;
|
||||||
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
|
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
|
||||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||||
use SilverStripe\ORM\DataModel;
|
|
||||||
use SilverStripe\View\ArrayData;
|
use SilverStripe\View\ArrayData;
|
||||||
use SilverStripe\View\Requirements;
|
use SilverStripe\View\Requirements;
|
||||||
|
|
||||||
@ -368,7 +367,7 @@ class BulkManager implements GridField_HTMLProvider, GridField_ColumnProvider, G
|
|||||||
//print_r('matched ' . $handlerClass . ' to ' . $rule);
|
//print_r('matched ' . $handlerClass . ' to ' . $rule);
|
||||||
$handler = Injector::inst()->create($handlerClass, $gridField, $this, $controller);
|
$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\FormAction;
|
||||||
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
use SilverStripe\Forms\GridField\GridField_HTMLProvider;
|
||||||
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
use SilverStripe\Forms\GridField\GridField_URLHandler;
|
||||||
use SilverStripe\ORM\DataModel;
|
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\View\ArrayData;
|
use SilverStripe\View\ArrayData;
|
||||||
use SilverStripe\View\Requirements;
|
use SilverStripe\View\Requirements;
|
||||||
@ -466,6 +465,6 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
|||||||
$controller = $gridField->getForm()->getController();
|
$controller = $gridField->getForm()->getController();
|
||||||
$handler = new \Colymba\BulkUpload\BulkUploaderRequest($gridField, $this, $controller);
|
$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
|
// 1. DataObject
|
||||||
//create record
|
//create record
|
||||||
$recordClass = $this->component->getRecordClassName($this->gridField);
|
$recordClass = $this->component->getRecordClassName($this->gridField);
|
||||||
$record = Object::create($recordClass);
|
$record = $recordClass::create();
|
||||||
$record->write();
|
$record->write();
|
||||||
|
|
||||||
// passes the current gridfield-instance to a call-back method on the new object
|
// passes the current gridfield-instance to a call-back method on the new object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user