collapsiblock.install in Collapsiblock 3.x
Same filename and directory in other branches
Install, update and uninstall functions for the Collapsiblock module.
File
collapsiblock.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Collapsiblock module.
*/
/**
* Upgrade to Collapsiblock 8.x-2.x.
*/
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();
}
Functions
Name | Description |
---|---|
collapsiblock_update_8201 | Upgrade to Collapsiblock 8.x-2.x. |