You have created a module controller that responds to the following URL: /mycompany/product/load/ id/123.

80. You have created a module controller that responds to the following URL:
/mycompany/product/load/ id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)


A. \Magento\Catalog\Model\ResourceModel\Product::load($productModel, $id)
B. \Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id)
C. \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)
D. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id)



Correct Answer: AD

No comments