arch-8.x-1.x-dev/modules/cart/arch_cart.services.yml

modules/cart/arch_cart.services.yml
parameters:
  # Set cart expirity to 7 days. If you want to change this value
  # You can change it with a custom ServiceProvider. See:
  # https://www.drupal.org/docs/8/api/services-and-dependency-injection/altering-existing-services-providing-dynamic-services
  cartstore.expire: 604800

services:
  arch_cart_handler:
    class: Drupal\arch_cart\Cart\CartHandler
    arguments:
      - '@entity_type.manager'
      - '@price_type.manager'
      - '@vat_category.manager'
      - '@module_handler'
      - '@current_user'
      - '@price_factory'
      - '@datetime.time'
      - '@private.cart_store'
      - '@request_stack'
      - '@session'

  private.cart_store:
    class: Drupal\Core\TempStore\PrivateTempStoreFactory
    arguments:
      - '@keyvalue.expirable'
      - '@lock'
      - '@current_user'
      - '@request_stack'
      - '%cartstore.expire%'
    tags:
      - { name: backend_overridable }

  # Remove when https://www.drupal.org/project/drupal/issues/3015530 resolved.
  arch_cart.request_subscriber:
    class: Drupal\arch_cart\EventSubscriber\LoginRequestEventSubscriber
    arguments:
      - '@request_stack'
      - '@current_route_match'
      - '@arch_cart_handler'
      - '@private.cart_store'
      - '@module_handler'
    tags:
      - { name: event_subscriber }

  access_check.cart.content:
    class: Drupal\arch_cart\Access\CartAccessCheck
    arguments: ['@current_route_match']
    tags:
      - { name: access_check, applies_to: _access_arch_cart }

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

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