You are here

function yamlform_update_8020 in YAML Form 8

Issue #2757479: Create dedicated form node module.

File

includes/yamlform.update.inc, line 547
YAML Form module update hooks.

Code

function yamlform_update_8020(&$sandbox) {

  // Since the form node configuration files are already installed, we
  // need to manually install the module.
  $extension_config = \Drupal::configFactory()
    ->getEditable('core.extension');
  $extension_config
    ->set("module.yamlform_node", 0)
    ->set('module', module_config_sort($extension_config
    ->get('module')))
    ->save(TRUE);
  drupal_static_reset('system_rebuild_module_data');
  drupal_set_installed_schema_version('yamlform_node', \Drupal::CORE_MINIMUM_SCHEMA_VERSION);
  \Drupal::logger('system')
    ->info('%module module installed.', [
    '%module' => 'yamlform',
  ]);
  return (string) t("The new YAML Form Node module has been enabled.");
}