-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdi.xml
60 lines (53 loc) · 2.41 KB
/
di.xml
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
<?xml version="1.0"?>
<!--
/**
* Smile_Offer dependency injection configuration.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future.
*
* @category Smile
* @package Smile\Offer
* @author Aurelien Foucret <[email protected]>
* @copyright 2016 Smile
* @license Open Software License ("OSL") v. 3.0
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Smile\Offer\Api\Data\OfferInterface" type="Smile\Offer\Model\Offer" />
<preference for="Smile\Offer\Api\Data\OfferSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />
<preference for="Smile\Offer\Api\OfferRepositoryInterface" type="Smile\Offer\Model\OfferRepository" />
<preference for="Smile\Offer\Api\OfferManagementInterface" type="Smile\Offer\Model\OfferManagement" />
<preference for="Smile\Offer\Model\Locator\LocatorInterface" type="Smile\Offer\Model\Locator\RegistryLocator"/>
<type name="Magento\Framework\EntityManager\MetadataPool">
<arguments>
<argument name="metadata" xsi:type="array">
<item name="Smile\Offer\Api\Data\OfferInterface" xsi:type="array">
<item name="entityTableName" xsi:type="string">smile_offer</item>
<item name="identifierField" xsi:type="string">offer_id</item>
</item>
</argument>
</arguments>
</type>
<type name="Magento\Framework\EntityManager\HydratorPool">
<arguments>
<argument name="hydrators" xsi:type="array">
<item name="Smile\Offer\Api\Data\OfferInterface" xsi:type="string">Magento\Framework\EntityManager\AbstractModelHydrator</item>
</argument>
</arguments>
</type>
<!-- Datasources resolver -->
<type name="Smile\ElasticsuiteCore\Index\Type\DataSourceResolver">
<arguments>
<argument name="datasources" xsi:type="array">
<item name="catalog_product" xsi:type="array">
<item name="product" xsi:type="array">
<item name="offers" xsi:type="object">Smile\Offer\Model\Product\Indexer\Fulltext\Datasource\OfferData</item>
</item>
</item>
</argument>
</arguments>
</type>
</config>