ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 4 - AD0-E722 discussion

Report
Export

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 'Magento\Framework\Config\Data' in di.xml
Answers
A.
Inject a 'reader' dependency for 'Magento\Framework\Config\Data' in di.xml
B.
Write a plugin for \Magento\Framework\Config\Data::get() and read the custom xml files
Answers
B.
Write a plugin for \Magento\Framework\Config\Data::get() and read the custom xml files
C.
Create a Data class that implements '\Magento\Framework\Config\Data'
Answers
C.
Create a Data class that implements '\Magento\Framework\Config\Data'
D.
Append the custom xml file name in 'Magento\Config\Model\Config\Structure\Reader' in di.xml
Answers
D.
Append the custom xml file name in 'Magento\Config\Model\Config\Structure\Reader' in di.xml
E.
Make a Reader class that implements '\Magento\Framework\Config\Reader\Filesystem'
Answers
E.
Make a Reader class that implements '\Magento\Framework\Config\Reader\Filesystem'
Suggested answer: C, E

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 ''\Magento\Framework\Config\Data'' interface or extend the ''\Magento\Framework\Config\Data'' class. The Reader class is responsible for reading and validating the xml configuration files from the file system. The Reader class should implement the '\Magento\Framework\Config\Reader\Filesystem' interface or extend the '\Magento\Framework\Config\Reader\Filesystem' 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.

Configuration types | Adobe Commerce - Experience League

Create configuration types | Adobe Commerce - Experience League

asked 02/10/2024
Dylan Johnson
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first