You are here

function pdb_vue_update_8101 in Decoupled Blocks: Vue.js 8

Add in a version config defaulted to vue2 for existing sites.

File

./pdb_vue.install, line 11
Update hooks.

Code

function pdb_vue_update_8101(&$sandbox) {

  /** @var \Drupal\Core\Config\Config $config */
  $config = \Drupal::service('config.factory')
    ->getEditable('pdb_vue.settings');
  $config
    ->set('version', 'vue2')
    ->save();
  return t('Set the default version of Vue to 2 for existing sites.');
}