-
Notifications
You must be signed in to change notification settings - Fork 4
/
di.xml
120 lines (104 loc) · 5.46 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Aligent\AsyncEvents\Api\AsyncEventRepositoryInterface"
type="Aligent\AsyncEvents\Model\AsyncEventRepository"/>
<preference for="Aligent\AsyncEvents\Api\Data\AsyncEventInterface"
type="Aligent\AsyncEvents\Model\AsyncEvent"/>
<preference for="Aligent\AsyncEvents\Api\Data\AsyncEventDisplayInterface"
type="Aligent\AsyncEvents\Model\AsyncEvent"/>
<preference for="Aligent\AsyncEvents\Api\Data\AsyncEventSearchResultsInterface"
type="Aligent\AsyncEvents\Model\AsyncEventSearchResults"/>
<!-- UI Component DataProviders -->
<type name="Aligent\AsyncEvents\Model\ResourceModel\AsyncEvent\Grid\Collection">
<arguments>
<argument name="mainTable" xsi:type="string">async_event_subscriber</argument>
<argument name="resourceModel" xsi:type="string">Aligent\AsyncEvents\Model\ResourceModel\AsyncEvent
</argument>
</arguments>
</type>
<type name="Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLog\Grid\Collection">
<arguments>
<argument name="mainTable" xsi:type="string">async_event_subscriber_log</argument>
<argument name="resourceModel" xsi:type="string">
Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLog
</argument>
</arguments>
</type>
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
<arguments>
<argument name="collections" xsi:type="array">
<item name="async_events_events_listing_data_source" xsi:type="string">
Aligent\AsyncEvents\Model\ResourceModel\AsyncEvent\Grid\Collection
</item>
<item name="async_events_logs_listing_data_source" xsi:type="string">
Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLog\Grid\Collection
</item>
<item name="async_events_logs_trace_data_source" xsi:type="string">
Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLogs\Grid\Collection
</item>
</argument>
</arguments>
</type>
<virtualType name="Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLogs\Grid\Collection"
type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
<arguments>
<argument name="mainTable" xsi:type="string">async_event_subscriber_log</argument>
<argument name="resourceModel" xsi:type="string">Aligent\AsyncEvents\Model\ResourceModel\AsyncEventLog
</argument>
</arguments>
</virtualType>
<!-- NotifierFactory and Notifier setup -->
<preference for="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactoryInterface"
type="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactory"/>
<type name="Aligent\AsyncEvents\Service\AsyncEvent\NotifierFactory">
<arguments>
<argument name="notifierClasses" xsi:type="array">
<item name="http" xsi:type="object">Aligent\AsyncEvents\Service\AsyncEvent\HttpNotifier</item>
</argument>
</arguments>
</type>
<!-- XML/XSD Config -->
<type name="Aligent\AsyncEvents\Model\Config\Reader">
<arguments>
<argument name="fileName" xsi:type="string">async_events.xml</argument>
<argument name="converter" xsi:type="object">Aligent\AsyncEvents\Model\Config\Converter</argument>
<argument name="schemaLocator" xsi:type="object">Aligent\AsyncEvents\Model\Config\SchemaLocator</argument>
</arguments>
</type>
<virtualType name="asyncEventDataStorage" type="Magento\Framework\Config\Data">
<arguments>
<argument name="reader" xsi:type="object">Aligent\AsyncEvents\Model\Config\Reader</argument>
<argument name="cacheId" xsi:type="string">async_event_config_cache</argument>
</arguments>
</virtualType>
<type name="Aligent\AsyncEvents\Model\Config">
<arguments>
<argument name="dataStorage" xsi:type="object">asyncEventDataStorage</argument>
</arguments>
</type>
<!-- Elasticsearch Indexing -->
<type name="Aligent\AsyncEvents\Model\Indexer\AsyncEventSubscriber">
<arguments>
<argument name="dimensionProvider" xsi:type="object" shared="false">\Aligent\AsyncEvents\Model\Indexer\AsyncEventDimensionProvider</argument>
</arguments>
</type>
<type name="\Aligent\AsyncEvents\Model\Indexer\IndexStructure">
<arguments>
<argument name="scopeResolver" xsi:type="object" shared="false">\Aligent\AsyncEvents\Model\Resolver\AsyncEvent</argument>
</arguments>
</type>
<type name="Magento\Elasticsearch\Model\Adapter\FieldMapper\FieldMapperResolver">
<arguments>
<argument name="fieldMappers" xsi:type="array">
<item name="async_event" xsi:type="string">
\Aligent\AsyncEvents\Model\Adapter\FieldMapper\DynamicFieldMapper
</item>
</argument>
</arguments>
</type>
<type name="Magento\Elasticsearch\Model\Adapter\Index\BuilderInterface">
<plugin name="map_string_scope_to_int"
type="Aligent\AsyncEvents\Plugin\MapStringScopeToInt"/>
</type>
</config>