commerce_amws-8.x-1.x-dev/modules/shipping/commerce_amws_shipping.module

modules/shipping/commerce_amws_shipping.module
<?php

/**
 * @file
 * Provides hooks and functionality for the Commerce Amazon MWS Shipping module.
 */

use Drupal\Core\Entity\EntityTypeInterface;

/**
 * {@inheritdoc}
 *
 * @see hook_entity_base_field_info()
 * @see \Drupal\commerce_amws_shipping\Hook\EntityField::getShippingMethodBaseFieldDefinitions()
 */
function commerce_amws_shipping_entity_base_field_info(
  EntityTypeInterface $entity_type
) {
  if ($entity_type->id() !== 'commerce_shipping_method') {
    return;
  }

  return \Drupal::service('commerce_amws_shipping.hook.entity_field')
    ->getShippingMethodBaseFieldDefinitions();
}

/**
 * {@inheritdoc}
 *
 * @see hook_modules_installed()
 * @see \Drupal\commerce_amws_shipping\Hook\EntityField::installShippingMethodBaseFieldDefinitions()
 */
function commerce_amws_shipping_modules_installed($modules, $is_syncing) {
  if (!in_array('commerce_amws_feed', $modules)) {
    return;
  }

  \Drupal::service('commerce_amws_shipping.hook.entity_field')
    ->installShippingMethodBaseFieldDefinitions();
}

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

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