Merge pull request #13 from s-m/create-callback

NEW: Added a callback before writing the record for the first time
This commit is contained in:
Thierry François 2013-02-02 08:19:17 -08:00
commit 381d6a28ad

View File

@ -284,6 +284,9 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
$record = Object::create($recordClass);
$record->setField($recordForeignKey, $recordForeignID);
// passes the current gridfield-instance to a call-back method on the new object
$record->extend("onBulkImageUpload", $this->gridField);
$record->write();
$upload = new Upload();