-
Notifications
You must be signed in to change notification settings - Fork 0
/
varbase_commerce.install
33 lines (27 loc) · 1.1 KB
/
varbase_commerce.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* @file
* Contains install and update for Varbase Media module.
*/
use Symfony\Component\Yaml\Yaml;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\FileStorage;
use Vardot\Entity\EntityDefinitionUpdateManager;
use Vardot\Installer\ModuleInstallerFactory;
/**
* Implements hook_install().
*/
function varbase_commerce_install() {
// Processer for install: in varbase_admin.info.yml file.
// ---------------------------------------------------------------------------.
ModuleInstallerFactory::installList('varbase_commerce');
// Install optional configs.
ModuleInstallerFactory::importConfigsFromScanedDirectory('varbase_commerce', '/^field.storage.*\\.(yml)$/i');
ModuleInstallerFactory::importConfigsFromScanedDirectory('varbase_commerce', '/^.*(.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();
}