mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
IMPR: Allow dot syntax UF Setup calls
Example: new BulkUploader()->setUfSetup('getValidator.setAllowedExtensions', ['jpg', 'jpeg', 'png', 'gif']);
This commit is contained in:
parent
c34bba4508
commit
357a4fd682
@ -250,7 +250,15 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
|
||||
|
||||
//UploadField setup
|
||||
foreach ($this->ufSetup as $fn => $param) {
|
||||
$uploadField->{$fn}($param);
|
||||
$funcs = explode('.', $fn);
|
||||
$lastCall = array_pop($funcs);
|
||||
|
||||
$res = $uploadField;
|
||||
foreach ($funcs as $call) {
|
||||
$res = $res->{$call}();
|
||||
}
|
||||
|
||||
$res->{$lastCall}($param);
|
||||
}
|
||||
|
||||
$schema['data']['createFileEndpoint'] = [
|
||||
|
Loading…
Reference in New Issue
Block a user