nerdexam
Adobe

AD0-E716 · Question #22

An Adobe Commerce developer is asked to change the tracking level on a custom module for free downloading of pdf and images. The module contains following models: Vendor\FreeDownload\Model\Download…

The correct answer is B. Option B. To configure the tracking_level parameter in di.xml to have a value of 4 for the Download class and all classes that extend Download, the developer would use the following code: <Vendor\FreeDownload\Model\Download> <setting name="tracking_level" value="4"/>…

Customization

Question

An Adobe Commerce developer is asked to change the tracking level on a custom module for free downloading of pdf and images. The module contains following models:

Vendor\FreeDownload\Model\Download Vendor\FreeDownload\Model\DownloadPdf extends Vendor\FreeDownload\Model\Download Vendor\FreeDownload\Model\DownloadImage extends Vendor\FreeDownload\Model\Download Download class has a parameter for tracking_level. How will the developer configure the tracking_level parameter, in di.xml.to have a value of 4 for Download class and all classes that extend Download? A) B) C)

Exhibit

AD0-E716 question #22 exhibit

Options

  • AOption A
  • BOption B
  • COption C

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    85% (23)
  • C
    11% (3)

Explanation

To configure the tracking_level parameter in di.xml to have a value of 4 for the Download class and all classes that extend Download, the developer would use the following code: <Vendor\FreeDownload\Model\Download> <setting name="tracking_level" value="4"/> </Vendor\FreeDownload\Model\Download> <Vendor\FreeDownload\Model\DownloadPdf> <rewrite name="tracking_level" value="4"/> </Vendor\FreeDownload\Model\DownloadPdf> <Vendor\FreeDownload\Model\DownloadImage> <rewrite name="tracking_level" value="4"/> </Vendor\FreeDownload\Model\DownloadImage> The setting element is used to set a configuration value for a specific model. The rewrite element is used to override the default configuration value for a specific model. In this case, the tracking_level parameter is set to 4 for all models that extend Download.

Topics

#dependency injection#di.xml#class inheritance#constructor parameters

Community Discussion

No community discussion yet for this question.

Full AD0-E716 Practice