Free AD0-E704 Questions for Adobe AD0-E704 Exam as PDF & Practice Test Software

Previous Page

Practice Test Question: 1 

OrangeCompany decided to build a REST API based module in the application so that he can share the details of best-selling products to his franchisee. To make it's flexible and customizable in the future, he advised his developers to enable the support of extension_attribute in the API interface so that any new attributes can be added when required. What is the way to enable the entity/interface to support extension attributes in the module?

A.    Check the interface for the methods getCustomAttributes() and setCustomAttributes() to determine if they are available for the entity.
B.    Check the interface for the implementation of Magento\Framework\Api\CustomAttributesDataInterface to enable support for extension attributes
C.    Check the interface for the implementation of Magento\Framework\EntityManager\Operation\ExtensionPool to enable support for extension attributes
D.    Check the interface for the methods getExtensionAttributes() and setExtensionAttributes() to determine if they are available for the entity.

  Answer: D    

Practice Test Question: 2


Suppose in the product rest API in Magento, you added a new attribute. But this attribute can be accessed by API consumers only when they have access permission. How do you create the attributes following the above condition:

A.    New attributes must be created as custom_attribute to restrict the access using ACL
B.    New attribute must be created as extension_attribute to restrict the access using ACL
C.    We can’t create access permission for REST API, it’s only applicable for entity and repository.
D.    New attributes must be created by extending the product API interface, to restrict access using ACL.

  Answer: B    

Practice Test Question: 3

 
A merchant wants to send email notifications to those customers after a week who placed the order but didn't pay. Suppose email content is almost similar to the default order email template content with some additional text, so you decided to use the same but in a new custom template. How you pass the order object to the email template so that it will render the all data of default template?

A.    Create json of all variables that are used in the email template and pass to setTemplateVars method of
_transportBuilder insatance.
B.    Load the order using increment_id and use getData() to convert it to array and then pass to setTemplateVars method of _transportBuilder instance.
C.    Load the order using increment_id and pass this object to setTemplateVars method of
_transportBuilder instance.
D.    None of these.

  Answer: D    

Practice Test Question: 4


A furniture merchant have 100k products in the store. In a custom product list page, he advised you to enable the caching as per user paginate the products. So what should the approach to cache the block data as per pagination request:

A.    In block class toHtml() method, define cache_lifetime, cache_tags and cache_key_
B.    In block class _construct() method, define cache_lifetime, cache_tags and cache_key_
C.    In block class toHtml() method, set _isScopePrivate property to false as per requested page number.
D.    In block class _construct() method, set _isScopePrivate property to false as per requested page number.

  Answer: B    

Practice Test Question: 5 


Suppose you are asked to disable/remove the customer review related functionalities. You can not disable the review module directly because the customer module depends on it. What is the possible way to remove all HTML outputs of the review module, from the frontend and backend? :

A.    Turn-off Review module output globally by extending
/vendor/magento/module-backend/etc/config.xml
B.    Turn-off Review module output globally by extending
/vendor/magento/module-backend/etc/module.xml
C.    Create plugin or Override the
 
class \Magento\Framework\View\Element\AbstractBlock and toHtml() method, and implement the logic to return empty data in case of review module’s block instance is present.
D.    Create plugin or Override the
class \Magento\Backend\Block\Template and isOutputEnabled() method, and implement the logic to return false value in case of review module’s block instance is present.
 
  Answer: A    

 

Next Page