Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CatalogPriceFactory.php
Go to the documentation of this file.
1 <?php
7 
12 {
16  protected $objectManager;
17 
22  {
23  $this->objectManager = $objectManager;
24  }
25 
33  public function create($name)
34  {
35  $customPriceModel = $this->objectManager->get($name);
36  if (!$customPriceModel instanceof \Magento\Catalog\Model\Product\CatalogPriceInterface) {
37  throw new \UnexpectedValueException(
38  'Class ' . $name . ' should be an instance of \Magento\Catalog\Model\Product\CatalogPriceInterface'
39  );
40  }
41 
42  return $customPriceModel;
43  }
44 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
if(!isset($_GET['name'])) $name
Definition: log.php:14