ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 9 - AD0-E716 discussion

Report
Export

An Adobe Commerce developer is developing a custom module. As part of their implementation they have decided that all instances of their Custom\Module\Model\Example class should receive a new instance of Magento\Filesystem\Adapter\Local.

How would the developer achieve this using di. xml?

A)

B)

C)

A.
Option A
Answers
A.
Option A
B.
Option B
Answers
B.
Option B
C.
Option C
Answers
C.
Option C
Suggested answer: B

Explanation:

The developer can achieve this by adding the following configuration to their di.xml file:

XML

<config>

<component name='Custom\Module\Model\Example' factory='Custom\Module\Model\ExampleFactory'>

</component>

</config>

This configuration will ensure that all instances of the Custom\Module\Model\Example class will receive a new instance of the Magento\Filesystem\Adapter\Local class.

asked 02/10/2024
Christian Gyssels
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first