widget_engine-8.x-1.2/modules/widget_engine_domain_access/widget_engine_domain_access.install

modules/widget_engine_domain_access/widget_engine_domain_access.install
<?php

/**
 * @file
 * Install, update and uninstall functions for the
 * Widget Engine Domain Access module.
 */

/**
 * Implements hook_install().
 *
 * Installs the default domain field on widgets.
 */
function widget_engine_domain_access_install() {
  // Assign domain access to bundles.
  $list = [];
  $widget_types = \Drupal::entityTypeManager()->getStorage('widget_type')->loadMultiple();
  foreach ($widget_types as $type => $info) {
    $list[$type] = 'widget';
  }
  // Install our fields.
  foreach ($list as $bundle => $entity_type) {
    widget_engine_domain_access_confirm_fields($entity_type, $bundle);
  }
}

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

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