Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ModifierFactory.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
20  protected $objectManager;
21 
28  {
29  $this->objectManager = $objectManager;
30  }
31 
40  public function create($className, array $data = [])
41  {
42  $model = $this->objectManager->create($className, $data);
43 
44  if (!$model instanceof ModifierInterface) {
45  throw new \InvalidArgumentException(
46  'Type "' . $className . '" is not instance on ' . ModifierInterface::class
47  );
48  }
49 
50  return $model;
51  }
52 }
__construct(ObjectManagerInterface $objectManager)
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31