nerdexam
Adobe

AD0-E716 · Question #9

AD0-E716 Question #9: Real Exam Question with Answer & Explanation

The correct answer is B. Option B. The developer can achieve this by adding the following configuration to their di.xml file: <component name="Custom\Module\Model\Example" factory="Custom\Module\Model\ExampleFactory"> <argument name="filesystemAdapter" type="Magento\Filesystem\Adapter\Local" /> This configuration

Question

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)

Options

  • AOption A
  • BOption B
  • COption C

Explanation

The developer can achieve this by adding the following configuration to their di.xml file: <component name="Custom\Module\Model\Example" factory="Custom\Module\Model\ExampleFactory"> <argument name="filesystemAdapter" type="Magento\Filesystem\Adapter\Local" /> 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.

Community Discussion

No community discussion yet for this question.

Full AD0-E716 Practice