You are here

function devel_update_8001 in Devel 8.2

Same name and namespace in other branches
  1. 8.3 devel.install \devel_update_8001()
  2. 8 devel.install \devel_update_8001()
  3. 4.x devel.install \devel_update_8001()

Set the default devel dumper plugin.

File

./devel.install, line 30
Install, update and uninstall functions for the devel module.

Code

function devel_update_8001() {
  $kint_enabled = \Drupal::moduleHandler()
    ->moduleExists('kint');
  $default_dumper = $kint_enabled ? 'kint' : 'default';

  // Set the default dumper plugin to kint if kint module is available.
  \Drupal::configFactory()
    ->getEditable('devel.settings')
    ->set('devel_dumper', $default_dumper)
    ->save(TRUE);
}