-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdi.xml
111 lines (103 loc) · 6.42 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
<?xml version="1.0"?>
<!-- @author Artemii Karkusha -->
<!-- @copyright Copyright (c) (https://www.linkedin.com/in/artemiy-karkusha/) -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\CreateSomethingInterface"
type="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\Api\CreateSomething"/>
<!--1.2-->
<preference for="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\Data\DeliveryServiceInterface"
type="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\Data\DeliveryServiceData"/>
<!--2.2-->
<type name="Magento\Framework\Console\CommandListInterface">
<arguments>
<argument name="commands" xsi:type="array">
<item name="createDeliveryService"
xsi:type="object">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Console\Command\DeliveryService\Create</item>
<item name="artemiikarkusha_adobecommercepreparingtocertification_send_email"
xsi:type="object">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Console\Command\SendEmail</item>
</argument>
</arguments>
</type>
<!--2.4-->
<preference for="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\SimpleInterface"
type="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\SimpleClass"/>
<preference for="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\ExampleHowDiIsUsedInterface"
type="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\ExampleHowDiIsUsed"/>
<type name="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\ExampleHowDiIsUsed">
<arguments>
<!-- Pass simple string -->
<argument name="stringParam" xsi:type="string">someStringValue</argument>
<!-- Pass true -->
<argument name="boolParam" xsi:type="boolean">1</argument>
<!-- Pass 1 -->
<argument name="intParam" xsi:type="number">1</argument>
<!-- Pass application init argument, named by constant value -->
<argument name="globalInitParam" xsi:type="init_parameter">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\ExampleHowDiIsUsedInterface::SOME_CONSTANT</argument>
<!-- Pass constant value -->
<argument name="constantParam" xsi:type="const">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\ExampleHowDiIsUsedInterface::SOME_CONSTANT</argument>
<!-- Pass array -->
<argument name="arrayParam" xsi:type="array">
<!-- First element is value of constant -->
<item name="firstElem" xsi:type="const">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\ExampleHowDiIsUsedInterface::SOME_CONSTANT</item>
<!-- Second element is null -->
<item name="secondElem" xsi:type="null"/>
<!-- Pass object -->
<item name="objectValue" xsi:type="object">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\SimpleClass</item>
<!-- Third element is a subarray -->
<item name="thirdElem" xsi:type="array">
<!-- Subarray contains scalar value -->
<item name="scalarValue" xsi:type="string">ScalarValue</item>
</item>
</argument>
</arguments>
</type>
<!--Sensitive and system-specific configuration settings 2.4-->
<type name="Magento\Config\Model\Config\TypePool">
<arguments>
<argument name="sensitive" xsi:type="array">
<item name="delivery_service_management/examples_of_all_field_types/field_type_is_password" xsi:type="string">1</item>
</argument>
<argument name="environment" xsi:type="array">
<item name="delivery_service_management/needed_configs_for_code_examples/scheduled_cron_time_for_upload_information_about_items_to_delivery_services" xsi:type="string">1</item>
</argument>
</arguments>
</type>
<!--Create a custom router 2.5-->
<type name="Magento\Framework\App\RouterList">
<arguments>
<argument name="routerList" xsi:type="array">
<item name="customRouterName" xsi:type="array">
<item name="class" xsi:type="string">ArtemiiKarkusha\AdobeCommercePreparingToCertification\Controller\CustomRouter</item>
<item name="disable" xsi:type="boolean">false</item>
<item name="sortOrder" xsi:type="string">70</item>
</item>
</argument>
</arguments>
</type>
<!--EmailNotifier-->
<preference for="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Api\EmailNotifierInterface"
type="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Model\Email\EmailNotifier"/>
<type name="ArtemiiKarkusha\AdobeCommercePreparingToCertification\Console\Command\SendEmail">
<arguments>
<argument name="options" xsi:type="array">
<item name="template_identifier" xsi:type="array">
<item name="optionName" xsi:type="string">template_identifier</item>
<item name="mode" xsi:type="const">Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED</item>
<item name="optionDescription" xsi:type="string">The template identifier which is sent</item>
</item>
<item name="send_to_email" xsi:type="array">
<item name="optionName" xsi:type="string">send_to_email</item>
<item name="mode" xsi:type="const">Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED</item>
<item name="optionDescription" xsi:type="string">The Email where is sent</item>
</item>
<item name="store_code" xsi:type="array">
<item name="optionName" xsi:type="string">store_code</item>
<item name="mode" xsi:type="const">Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED</item>
<item name="optionDescription" xsi:type="string">Store code</item>
</item>
</argument>
</arguments>
</type>
<!--/EmailNotifier-->
</config>