Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ProcessorFactory.php
Go to the documentation of this file.
1 <?php
7 
12 {
18  protected $objectManager;
19 
25  protected $instanceName;
26 
33  public function __construct(
35  $instanceName = \Magento\Framework\View\Layout\ProcessorInterface::class
36  ) {
37  $this->objectManager = $objectManager;
38  $this->instanceName = $instanceName;
39  }
40 
47  public function create(array $data = [])
48  {
49  return $this->objectManager->create($this->instanceName, $data);
50  }
51 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\View\Layout\ProcessorInterface::class)