Commit fe8fbd86 authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #3272207: Switch to use the Module Installer Factory in the Varbase Blog...

Issue #3272207: Switch to use the Module Installer Factory in the Varbase Blog (Corporate Blog) module
parent 074ded6b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5,10 +5,7 @@
 * Install, update and uninstall functions for the varbase blog module.
 */

use Symfony\Component\Yaml\Yaml;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\FileStorage;
use Vardot\Installer\ModuleInstallerFactory;

/**
@@ -24,6 +21,12 @@ function varbase_blog_install() {
  ModuleInstallerFactory::importConfigsFromScanedDirectory('varbase_blog', '/^field.storage.*\\.(yml)$/i');
  ModuleInstallerFactory::importConfigsFromScanedDirectory('varbase_blog', '/^.*(settings.yml)$/i');

  // Entity updates to clear up any mismatched entity and/or field definitions
  // And Fix changes were detected in the entity type and field definitions.
  \Drupal::classResolver()
    ->getInstanceFromDefinition(EntityDefinitionUpdateManager::class)
    ->applyUpdates();

  // Forced configs import on install.
  $forced_configs = [
    'views.view.taxonomy_term',