function thunder_media_update_8006 in Thunder 8.2
Enable auto_select on multiple_image_browser.
File
- modules/
thunder_media/ thunder_media.install, line 305 - Contains.
Code
function thunder_media_update_8006() {
// Ensure that defined widgets exist, in other case wrong configuration could
// be generated. It's not possible to check for existing value of updated
// configuration, because it's introduced with new entity browser
// functionality for auto select of entities in view and dropzonejs widgets.
// We are checking only that widgets previously provided by configuration are
// still exist and only they will be updated.
$expectedConfig['widgets']['7d7f8f45-f628-48a3-84a8-c962c73f39e8']['uuid'] = '7d7f8f45-f628-48a3-84a8-c962c73f39e8';
$expectedConfig['widgets']['89532aea-140d-4b9e-96f4-2aa489c095cb']['uuid'] = '89532aea-140d-4b9e-96f4-2aa489c095cb';
// New configuration that should be applied.
$newConfig['widgets']['7d7f8f45-f628-48a3-84a8-c962c73f39e8']['settings']['auto_select'] = TRUE;
$newConfig['widgets']['89532aea-140d-4b9e-96f4-2aa489c095cb']['settings']['auto_select'] = TRUE;
_thunder_media_update_entity_browser_config('multiple_image_browser', $newConfig, $expectedConfig);
}