Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Product.php
Go to the documentation of this file.
1 <?php
9 
12 
14 {
20  protected function _initProduct()
21  {
22  $categoryId = (int)$this->getRequest()->getParam('category', false);
23  $productId = (int)$this->getRequest()->getParam('id');
24 
25  $params = new \Magento\Framework\DataObject();
26  $params->setCategoryId($categoryId);
27 
29  $product = $this->_objectManager->get(\Magento\Catalog\Helper\Product::class);
30  return $product->initProduct($productId, $this, $params);
31  }
32 }
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18