Free AD0-E704 Exam Braindumps (page: 2)

Page 1 of 23

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?

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

Answer(s): D



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:

  1. New attributes must be created as custom_attribute to restrict the access using ACL
  2. New attribute must be created as extension_attribute to restrict the access using ACL
  3. We can't create access permission for REST API, it's only applicable for entity and repository.
  4. New attributes must be created by extending the product API interface, to restrict access using ACL.

Answer(s): B



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?

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

Answer(s): D



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:

  1. In block class toHtml() method, define cache_lifetime, cache_tags and cache_key_<current_page_here>
  2. In block class _construct() method, define cache_lifetime, cache_tags and cache_key_<current_page_here>
  3. In block class toHtml() method, set _isScopePrivate property to false as per requested page number.
  4. In block class _construct() method, set _isScopePrivate property to false as per requested page number.

Answer(s): B






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

AD0-E704 Discussions & Posts