function jsonapi_update_8701 in Drupal 8
Enable BC: default the new read-only mode to "off" on existing sites.
File
- core/
modules/ jsonapi/ jsonapi.install, line 82 - Module install file.
Code
function jsonapi_update_8701() {
$config_factory = \Drupal::configFactory();
$jsonapi_settings = $config_factory
->getEditable('jsonapi.settings');
$jsonapi_settings
->set('read_only', FALSE)
->save(TRUE);
}