Câu 32: Magento 2 Certified Associate Developer
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.)
Nội dung câu hỏi
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.)
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. \Magento\Catalog\Model\ResourceModel\Product::load($productModel, $id)
- B. \Magento\Catalog\Model\ResourceModel\Product\Collection::load()->fetchById($id) — đáp án hiện tại
- C. \Magento\Catalog\Model\ResourceModel\Product\Collection::fetchItemById($id)
- D. \Magento\Catalog\Api\ProductRepositoryInterface::getById($id) — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.