Which two methods will load the product model by ID as specified in the URL?

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. MagentoCatalogModelResourceModelProduct::load($productModel, $id)
B. MagentoCatalogModelResourceModelProductCollection::load()->fetchById($id)
C. MagentoCatalogModelResourceModelProductCollection::fetchItemById($id)
D. MagentoCatalogApiProductRepositoryInterface::getById($id)

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which two methods will load the product model by ID as specified in the URL?

  1. A and D is correct
    \Magento\Catalog\Model\ResourceModel\Product::load
    \Magento\Catalog\Api\ProductRepositoryInterface::getById

    There is no such thing like fetchById or fetchItemById

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.