Free AD0-E704 Exam Braindumps (page: 7)

Page 6 of 23

Consider below example of etc/di.xml: Magento\Filesystem\Adapter\Local Please select correct statement based on shared="false" attribute in the example:

  1. Magento\Filesystem is not shared, so all clients will retrieve separate instances of Magento\Filesystem. Also, every instance of Magento\Filesystem will get separate instance of $adapter, because it is non-shared too.
  2. Magento\Filesystem is not shared, so all clients will retrieve same instances of Magento\Filesystem. Also, every instance of Magento\Filesystem will get same instance of $adapter, because it is non-shared too.
  3. Magento\Filesystem is not shared, so no clients will retrieve any instances of Magento\Filesystem.
    Also, no instance of Magento\Filesystem will get any instance of $adapter, because it is non-shared too.
  4. None of these.

Answer(s): A



Suppose there are 3 classes: Class A, B and C. Class C have dependecy of Class A You need to overrride/change an argument of class A, create an object of it and inject in Class B in such a way that it should not affect the class C. What should be the magento standard way to do this:

  1. In module's etc/di.xml, define virtualType node to override argument and create a subclass of
    Then use type node to pass the subclass A object into class B.
  2. In module's etc/config.xml, define virtualType node to override argument and create a subclass of
  3. Then use type node to pass the subclass A object into class B.
  4. In module's etc/system.xml, define virtualType node to override argument and create a subclass of A. Then use type node to pass the subclass A object into class B.
  5. In module's etc/menu.xml, define virtualType node to override argument and create a subclass of
  6. Then use type node to pass the subclass A object into class B.

Answer(s): A



Magento can load the configuration file di.xml area-specific. During bootstrapping, each application entry point loads the appropriate di.xml files for the requested are

  1. Please select the set of correct areas, where this file can be loaded by Magento:
  2. adminhtml, frontend, webapi_rest, webapi_soap, crontab
  3. backend, frontend, webapi_rest, webapi_soap, crontab
  4. adminhtml, frontend, webapi_rest, webapi_soap, system
  5. backend, frontend, webapi_rest, webapi_soap, system

Answer(s): A



Suppose, you need to create custom configuration file called search.xml, in the a custommodule under etc/.
Which steps are needed to achieve this:

  1. Create module_dir/etc/search.xml and modules_dir/etc/search.xsd
  2. Define loader in module_dir/etc/di.xml, for the custom conifguration file module_dir/etc/search.xml
  3. Create module_dir/etc/config.xml and modules_dir/etc/config.xsd
  4. Define loader in module_dir/etc/di.xml, for the custom conifguration file module_dir/etc/config.xml

Answer(s): A,B






Post your Comments and Discuss Adobe AD0-E704 exam with other Community members:

AD0-E704 Discussions & Posts