Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?
A) You should implement a new API endpoint instead of returning JSON from a controller
B) The string value of \Zend_Json::encode() The string value of \Zend_Json::encode()
C) An instance of \Magento\Framework\Controller\Result\Json An instance of \Magento\Framework\Controller\Result\Json
D) No return needed, an object that can be converted to JSON must be set as the Response body
Correct Answer:
Verified
Q19: \Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and
Q20: You are setting up a brand new
Q21: You have been given the task of
Q22: You added a new constructor argument to
Q23: A custom module must make changes to
Q25: Which entity in Magento supports scoped attributes?
A)
Q26: You are creating a new page layout
Q27: You have loaded an instance of Magento\Catalog\Model\Product
Q28: You need to find all orders in
Q29: A module you are developing requires the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents