In a custom module, an Architect wants to define a new xml configuration file. The module should be able to read all the xml configuration files declared in the system, merge them together, and use their values in PHP class.
Which two steps should the Architect make to meet this requirement? (Choose two.)
A . Inject a "reader" dependency for "MagentoFrameworkConfigData" in di.xml
B . Write a plugin for MagentoFrameworkConfigData::get() and read the custom xml files
C . Create a Data class that implements "MagentoFrameworkConfigData"
D . Append the custom xml file name in "MagentoConfigModelConfigStructureReader" in di.xml
E . Make a Reader class that implements ‘MagentoFrameworkConfigReaderFilesystem"
Answer: CE
Explanation:
According to the Adobe Commerce documentation, to create a new xml configuration file, the Architect needs to create a Data class and a Reader class for the custom module. The Data class is responsible for storing and retrieving the configuration data from the cache or the Reader class. The Data class should implement the “MagentoFrameworkConfigData” interface or extend the “MagentoFrameworkConfigData” class. The Reader class is responsible for reading and validating the xml configuration files from the file system. The Reader class should implement the ‘MagentoFrameworkConfigReaderFilesystem" interface or extend the ‘MagentoFrameworkConfigReaderFilesystem" class. The Architect also needs to declare the Data class and the Reader class in the di.xml file of the custom module, and specify the name of the xml configuration file, the converter class, and the schema locator class for the Reader class.
Reference: Configuration types | Adobe Commerce – Experience League Create configuration types | Adobe Commerce – Experience League
Latest AD0-E722 Dumps Valid Version with 50 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund