function collapsiblock_update_8201 in Collapsiblock 4.x
Same name and namespace in other branches
- 8.2 collapsiblock.install \collapsiblock_update_8201()
- 3.x collapsiblock.install \collapsiblock_update_8201()
Upgrade to Collapsiblock 8.x-2.x.
File
- ./
collapsiblock.install, line 11 - Install, update and uninstall functions for the Collapsiblock module.
Code
function collapsiblock_update_8201(&$sandbox) {
$settings = \Drupal::configFactory()
->getEditable('collapsiblock.settings');
$action = $settings
->get('default_state');
$action = empty($action) ? '1' : $action;
$settings
->set('default_action', $action)
->clear('default_state')
->clear('title')
->clear('block')
->clear('content')
->save();
}