From e6ae392527dc9a2bbc9780f1f58ea4b0c637d632 Mon Sep 17 00:00:00 2001 From: Raul E Watson Date: Mon, 11 Nov 2019 01:50:29 +0000 Subject: [PATCH] #3361 New Configuration Type Topic --- .../v2.3/config-guide/config/config-files.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/guides/v2.3/config-guide/config/config-files.md b/guides/v2.3/config-guide/config/config-files.md index 866620f8790..d83db27e18e 100644 --- a/guides/v2.3/config-guide/config/config-files.md +++ b/guides/v2.3/config-guide/config/config-files.md @@ -127,6 +127,39 @@ That is, the file system, database, other storage merges the configuration files * [Framework\Config\ScopeListInterface]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Config/ScopeListInterface.php), which returns a list of scopes. * [Framework\Config\ValidationStateInterface]({{ site.mage2bloburl }}/{{ page.guide_version }}/lib/internal/Magento/Framework/Config/ValidationStateInterface.php), which retrieves the validation state. +### Examples of use +The following example shows how to use the classes previously described in this section to create a configuration object. We are going to use the Sales_Module to illustrate this example. + +```xml + + + + + pdf.xml + Magento\Sales\Model\Order\Pdf\Config\Converter + Magento\Sales\Model\Order\Pdf\Config\SchemaLocator + + + + + + Magento\Sales\Model\Order\Pdf\Config\Reader + sales_pdf_config + + + + + + pdfConfigDataStorage + + + + +``` +As you can see, the first type node sets the Reader's filename, associated Converter and SchemaLocator classes. + +Then, The pdfConfigDataStorage virtual type attaches that reader class to an instance of Magento\Framework\Config\Data. And finally, the last type attaches that config data virtual type to the Magento\Sales\Model\Order\Pdf\Config class, which is used for actually reading values in from those pdf.xml files. + #### Related topics * [Create or extend configuration types]({{ page.baseurl }}/config-guide/config/config-create.html)