readonlymode.post_update.php in Read only mode 2.0.x
Same filename and directory in other branches
Post update functions for Readonly mode.
File
readonlymode.post_update.phpView source
<?php
/**
* @file
* Post update functions for Readonly mode.
*/
/**
* Update config after form alter implementation is removed.
*/
function readonlymode_post_update_no_form_alter() {
$config = \Drupal::configFactory()
->getEditable('readonlymode.settings');
$data = array_filter($config
->get(), function ($key) {
return $key === 'messages' || strpos($key, '_core') === 0;
}, ARRAY_FILTER_USE_KEY);
$config
->setData($data);
$config
->save();
}
Functions
Name | Description |
---|---|
readonlymode_post_update_no_form_alter | Update config after form alter implementation is removed. |