di.xml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License").
  7. * You may not use this file except in compliance with the License.
  8. * A copy of the License is located at
  9. *
  10. * http://aws.amazon.com/apache2.0
  11. *
  12. * or in the "license" file accompanying this file. This file is distributed
  13. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  14. * express or implied. See the License for the specific language governing
  15. * permissions and limitations under the License.
  16. */
  17. -->
  18. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  19. <preference for="Amazon\Login\Api\CustomerLinkRepositoryInterface" type="Amazon\Login\Model\CustomerLinkRepository" />
  20. <preference for="Amazon\Login\Api\CustomerLinkManagementInterface" type="Amazon\Login\Model\CustomerLinkManagement" />
  21. <preference for="Amazon\Login\Api\CustomerManagementInterface" type="Amazon\Login\Model\CustomerManagement" />
  22. <preference for="Amazon\Login\Api\Data\CustomerLinkInterface" type="Amazon\Login\Model\ResourceModel\CustomerLink" />
  23. <preference for="Amazon\Login\Api\Data\CustomerLinkSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
  24. <type name="Amazon\Login\Model\Customer\MatcherInterface">
  25. <arguments>
  26. <argument name="matchers" xsi:type="array">
  27. <item name="sessionmatcher" xsi:type="object">Amazon\Login\Model\Customer\SessionMatcher</item>
  28. <item name="idmatcher" xsi:type="object">Amazon\Login\Model\Customer\IdMatcher</item>
  29. <item name="emailmatcher" xsi:type="object">Amazon\Login\Model\Customer\EmailMatcher</item>
  30. </argument>
  31. </arguments>
  32. </type>
  33. <type name="Magento\Customer\Api\CustomerRepositoryInterface">
  34. <plugin name="amazon_login_customer_repository" type="Amazon\Login\Plugin\CustomerRepository" sortOrder="1" />
  35. </type>
  36. <type name="Magento\Customer\Model\ResourceModel\Customer\Collection">
  37. <plugin name="amazon_login_customer_collection" type="Amazon\Login\Plugin\CustomerCollection" sortOrder="1" />
  38. </type>
  39. <type name="Magento\Checkout\Controller\Cart\Index">
  40. <plugin name="amazon_login_cart_controller" type="Amazon\Login\Plugin\CartController" sortOrder="1" />
  41. </type>
  42. <type name="Magento\Checkout\Controller\Index\Index">
  43. <plugin name="amazon_login_checkout_controller" type="Amazon\Login\Plugin\CheckoutController" sortOrder="1" />
  44. </type>
  45. <type name="Magento\Customer\Controller\Account\Login">
  46. <plugin name="amazon_login_login_controller" type="Amazon\Login\Plugin\LoginController" sortOrder="1" />
  47. </type>
  48. <type name="Magento\Customer\Controller\Account\Create">
  49. <plugin name="amazon_login_create_controller" type="Amazon\Login\Plugin\CreateController" sortOrder="1" />
  50. </type>
  51. <type name="Amazon\Login\Controller\Login\Authorize">
  52. <arguments>
  53. <argument name="matcher" xsi:type="object">Amazon\Login\Model\Customer\CompositeMatcher</argument>
  54. </arguments>
  55. </type>
  56. <type name="Amazon\Login\Helper\Session">
  57. <arguments>
  58. <argument name="session" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
  59. </arguments>
  60. </type>
  61. <type name="Magento\Sales\Api\OrderCustomerManagementInterface">
  62. <plugin name="amazon_login_order_customer_service" type="Amazon\Login\Plugin\OrderCustomerManagement" sortOrder="1" />
  63. </type>
  64. <type name="Amazon\Login\Model\Customer\Account\Redirect">
  65. <arguments>
  66. <argument name="checkoutSession" xsi:type="object">Magento\Checkout\Model\Session\Proxy</argument>
  67. <argument name="customerSession" xsi:type="object">Magento\Customer\Model\Session\Proxy</argument>
  68. </arguments>
  69. </type>
  70. </config>