Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RenderFactory.php
Go to the documentation of this file.
1 <?php
7 
10 
18 {
24  protected $objectManager;
25 
32  {
33  $this->objectManager = $objectManager;
34  }
35 
43  public function get($type)
44  {
45  $className = 'Magento\\Framework\\View\\Render\\' . ucfirst($type);
46  $model = $this->objectManager->get($className);
47  if (!$model instanceof RenderInterface) {
48  throw new \InvalidArgumentException(
49  'Type "' . $type . '" is not instance on Magento\Framework\View\RenderInterface'
50  );
51  }
52  return $model;
53  }
54 }
$type
Definition: item.phtml:13
__construct(ObjectManagerInterface $objectManager)
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31