diff --git a/README.md b/README.md index 4e51388..376c59a 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,11 @@ The master branch will try to be compatible with the latest SilverStripe release * Download and copy module in SilverStripe root directory and name it whatever you want * flush the manifest +## 2.0.0 deprecations +Major depractions in latest 2.0.0 release: +* The `GridFieldBulkImageUpload` has been renamed to `GridFieldBulkUpload`. +* `onBulkImageUpload` callback has been renamed to `onBulkUpload` + ## Bulk Upload Upload multiple images or files at once into DataObjects. Perfect for galleries and the like. diff --git a/bulkUpload/code/GridFieldBulkImageUpload.php b/bulkUpload/code/GridFieldBulkImageUpload.php new file mode 100644 index 0000000..aade985 --- /dev/null +++ b/bulkUpload/code/GridFieldBulkImageUpload.php @@ -0,0 +1,25 @@ +write(); // passes the current gridfield-instance to a call-back method on the new object - $record->extend("onBulkFileUpload", $this->gridField); + $record->extend("onBulkUpload", $this->gridField); + if ( $record->hasMethod('onBulkImageUpload') ) + { + Deprecation::notice('2.0', '"onBulkImageUpload" callback is deprecated, use "onBulkUpload" instead.'); + $record->extend("onBulkImageUpload", $this->gridField); + } //get uploadField and process upload $uploadField = $this->getUploadField();