From c70566dc76e38799dec52354b565a782a84928e5 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Thu, 17 Dec 2020 18:30:06 +0530 Subject: [PATCH 1/3] Update proxies.md Example of the proxy class from the core code. --- src/guides/v2.3/extension-dev-guide/proxies.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/guides/v2.3/extension-dev-guide/proxies.md b/src/guides/v2.3/extension-dev-guide/proxies.md index 4049f40a487..2474779c8c3 100644 --- a/src/guides/v2.3/extension-dev-guide/proxies.md +++ b/src/guides/v2.3/extension-dev-guide/proxies.md @@ -73,3 +73,13 @@ With the proxy used in place of `SlowLoading`, the `SlowLoading` class will not Because DI configuration is used to inject a proxy, proxies can be dropped in to replace their corresponding classes - or proxy replacements _removed_ - without touching application code. As a practical example of a proxy, you can see the [StoreManager]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Store/Model/StoreManager.php){:target="_blank"} class and then see the generated `StoreManager` proxy class. + +Real Example from the Magento core code, We are passing `storeManager` argument as proxy to the `Magento\Store\Model\Resolver\Store` class. +Define StoreManagerInterface as proxy class by adding `Proxy` Class at the end of original class in the `di.xml` file. `Magento\Store\Model\StoreManagerInterface\Proxy` +```xml + + + Magento\Store\Model\StoreManagerInterface\Proxy + + +``` From 6909c92f00c0d7fbdb244fd39c8b84bacbc5d2a5 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Fri, 18 Dec 2020 11:46:41 +0530 Subject: [PATCH 2/3] Update proxies.md --- src/guides/v2.3/extension-dev-guide/proxies.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guides/v2.3/extension-dev-guide/proxies.md b/src/guides/v2.3/extension-dev-guide/proxies.md index 2474779c8c3..e72f9ad08a2 100644 --- a/src/guides/v2.3/extension-dev-guide/proxies.md +++ b/src/guides/v2.3/extension-dev-guide/proxies.md @@ -74,8 +74,8 @@ Because DI configuration is used to inject a proxy, proxies can be dropped in to As a practical example of a proxy, you can see the [StoreManager]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Store/Model/StoreManager.php){:target="_blank"} class and then see the generated `StoreManager` proxy class. -Real Example from the Magento core code, We are passing `storeManager` argument as proxy to the `Magento\Store\Model\Resolver\Store` class. -Define StoreManagerInterface as proxy class by adding `Proxy` Class at the end of original class in the `di.xml` file. `Magento\Store\Model\StoreManagerInterface\Proxy` +The following excerpt from the Magento code passes the `storeManager` argument as a proxy to the `Magento\Store\Model\Resolver\Store` class. The `StoreManagerInterface` model is defined as a proxy class by adding `Proxy` at the end of original class in the `di.xml` file. + ```xml From 3ad0adf16c4fb23fb9bb00cb11354e75606341cf Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Tue, 22 Dec 2020 12:16:51 +0530 Subject: [PATCH 3/3] Update proxies.md --- src/guides/v2.3/extension-dev-guide/proxies.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guides/v2.3/extension-dev-guide/proxies.md b/src/guides/v2.3/extension-dev-guide/proxies.md index e72f9ad08a2..6fa33affb31 100644 --- a/src/guides/v2.3/extension-dev-guide/proxies.md +++ b/src/guides/v2.3/extension-dev-guide/proxies.md @@ -74,7 +74,7 @@ Because DI configuration is used to inject a proxy, proxies can be dropped in to As a practical example of a proxy, you can see the [StoreManager]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Store/Model/StoreManager.php){:target="_blank"} class and then see the generated `StoreManager` proxy class. -The following excerpt from the Magento code passes the `storeManager` argument as a proxy to the `Magento\Store\Model\Resolver\Store` class. The `StoreManagerInterface` model is defined as a proxy class by adding `Proxy` at the end of original class in the `di.xml` file. +The following excerpt from the Magento code passes the `storeManager` argument as a proxy to the `Magento\Store\Model\Resolver\Store` class. The `StoreManagerInterface` model is defined as a proxy class by the added `Proxy` at the end of the original class in the `di.xml` file. ```xml