services:
  _defaults:
    public: true

  # SECURITY
  prestashop.adapter.security.admin:
    class: "%AdapterSecurityAdminClass%"
    arguments:
      - "@prestashop.adapter.legacy.context"
      - "@security.token_storage"
      - "@prestashop.security.admin.provider"
      - "@security.helper"
    tags:
      - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }

  prestashop.adapter.legacy_context_loader:
    class: 'PrestaShop\PrestaShop\Adapter\LegacyContextLoader'
    arguments: [ '@=service("prestashop.adapter.legacy.context").getContext()' ]
