di.xml 3.94 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\Url\SecurityInfo">
        <arguments>
            <argument name="secureUrlList" xsi:type="array">
                <item name="customer" xsi:type="string">/customer/</item>
            </argument>
            <argument name="excludedUrlList" xsi:type="array">
                <item name="customer_sections" xsi:type="string">/customer/section/load</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Framework\View\Layout">
        <plugin name="customer-session-depersonalize"
                type="Magento\Customer\Model\Layout\DepersonalizePlugin" sortOrder="10"/>
    </type>
    <type name="Magento\Framework\App\Action\AbstractAction">
        <plugin name="customer-app-action-dispatchController-context-plugin"
                type="Magento\Customer\Model\App\Action\ContextPlugin" sortOrder="10"/>
    </type>
    <preference for="Magento\Customer\CustomerData\SectionPoolInterface"
                type="Magento\Customer\CustomerData\SectionPool"/>
    <type name="Magento\Customer\CustomerData\SectionPoolInterface">
        <arguments>
            <argument name="sectionSourceMap" xsi:type="array">
                <item name="customer" xsi:type="string">Magento\Customer\CustomerData\Customer</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Customer\Controller\Plugin\Account">
        <arguments>
            <argument name="allowedActions" xsi:type="array">
                <item name="create" xsi:type="string">create</item>
                <item name="login" xsi:type="string">login</item>
                <item name="logoutsuccess" xsi:type="string">logoutsuccess</item>
                <item name="forgotpassword" xsi:type="string">forgotpassword</item>
                <item name="forgotpasswordpost" xsi:type="string">forgotpasswordpost</item>
                <item name="resetpassword" xsi:type="string">resetpassword</item>
                <item name="resetpasswordpost" xsi:type="string">resetpasswordpost</item>
                <item name="confirm" xsi:type="string">confirm</item>
                <item name="confirmation" xsi:type="string">confirmation</item>
                <item name="createpassword" xsi:type="string">createpassword</item>
                <item name="createpost" xsi:type="string">createpost</item>
                <item name="loginpost" xsi:type="string">loginpost</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Customer\Controller\AbstractAccount">
        <plugin name="customer_account" type="Magento\Customer\Controller\Plugin\Account" />
    </type>
    <type name="Magento\Checkout\Block\Cart\Sidebar">
        <plugin name="customer_cart" type="Magento\Customer\Model\Cart\ConfigPlugin" />
    </type>
    <type name="Magento\Framework\Session\SessionManager">
        <plugin name="session_checker" type="Magento\Customer\CustomerData\Plugin\SessionChecker" />
    </type>
    <type name="Magento\Authorization\Model\CompositeUserContext">
        <arguments>
            <argument name="userContexts" xsi:type="array">
                <item name="customerSessionUserContext" xsi:type="array">
                    <item name="type" xsi:type="object">Magento\Customer\Model\Authorization\CustomerSessionUserContext</item>
                    <item name="sortOrder" xsi:type="string">10</item>
                </item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Customer\Block\CustomerData">
        <arguments>
            <argument name="expirableSectionNames" xsi:type="array">
                <item name="cart" xsi:type="string">cart</item>
            </argument>
        </arguments>
    </type>
</config>