Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Factory.php
Go to the documentation of this file.
1 <?php
8 
11 
15 class Factory
16 {
22  private $objectManager;
23 
29  public function __construct(ObjectManagerInterface $objectManager)
30  {
31  $this->objectManager = $objectManager;
32  }
33 
43  public function create($filename, $module = '', ThemeInterface $theme = null, $isBase = false)
44  {
45  return $this->objectManager->create(
46  \Magento\Framework\View\File::class,
47  ['filename' => $filename, 'module' => $module, 'theme' => $theme, 'isBase' => $isBase]
48  );
49  }
50 }
create($filename, $module='', ThemeInterface $theme=null, $isBase=false)
Definition: Factory.php:43
$objectManager
Definition: bootstrap.php:17
__construct(ObjectManagerInterface $objectManager)
Definition: Factory.php:29