varbase_layout_builder-9.0.0-alpha2/modules/vlplb/vlplb.install

modules/vlplb/vlplb.install
<?php

/**
 * @file
 * Install, update and uninstall functions.
 *
 * Form Varbase Landing page (Layout Builder) module.
 */

use Vardot\Entity\EntityDefinitionUpdateManager;
use Vardot\Installer\ModuleInstallerFactory;

// Include all helpers and updates.
include_once __DIR__ . '/includes/helpers.inc';
include_once __DIR__ . '/includes/updates.inc';

/**
 * Implements hook_install().
 */
function vlplb_install() {

  // Processor for install: in vlplb.info.yml file.
  ModuleInstallerFactory::installList('vlplb');

  // Install optional configs.
  ModuleInstallerFactory::importConfigsFromScanedDirectory('vlplb', '/^field.storage.*\\.(yml)$/i');
  ModuleInstallerFactory::importConfigsFromScanedDirectory('vlplb', '/^.*(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();

  // Add permissions.
  ModuleInstallerFactory::addPermissions('vlplb');

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc