NEW: Added a callback before writing the record for the first time, allowing the corresponding DataObject to execute code related to the current gridField.

This commit is contained in:
Steffen Maaß 2013-02-02 13:45:52 +01:00
parent 2cc9a999f9
commit 09554b27b4
1 changed files with 3 additions and 0 deletions

View File

@ -264,6 +264,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();