Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Factory Class Reference

Public Member Functions

 __construct (ObjectManagerInterface $objectManager)
 
 create ($filename, $module='', ThemeInterface $theme=null, $isBase=false)
 

Detailed Description

Factory that produces view file instances

Definition at line 15 of file Factory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ObjectManagerInterface  $objectManager)

Constructor

Parameters
ObjectManagerInterface$objectManager

Definition at line 29 of file Factory.php.

30  {
31  $this->objectManager = $objectManager;
32  }
$objectManager
Definition: bootstrap.php:17

Member Function Documentation

◆ create()

create (   $filename,
  $module = '',
ThemeInterface  $theme = null,
  $isBase = false 
)

Return newly created instance of a view file

Parameters
string$filename
string$module
ThemeInterface | null$theme
bool$isBase
Returns
\Magento\Framework\View\File

Definition at line 43 of file Factory.php.

44  {
45  return $this->objectManager->create(
46  \Magento\Framework\View\File::class,
47  ['filename' => $filename, 'module' => $module, 'theme' => $theme, 'isBase' => $isBase]
48  );
49  }

The documentation for this class was generated from the following file: