Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
ElementFactory Class Reference

Public Member Functions

 __construct (\Magento\Framework\ObjectManagerInterface $objectManager)
 
 create ($className, array $data=[])
 

Protected Attributes

 $_objectManager
 

Detailed Description

Definition at line 9 of file ElementFactory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\ObjectManagerInterface  $objectManager)
Parameters
\Magento\Framework\ObjectManagerInterface$objectManager

Definition at line 19 of file ElementFactory.php.

20  {
21  $this->_objectManager = $objectManager;
22  }
$objectManager
Definition: bootstrap.php:17

Member Function Documentation

◆ create()

create (   $className,
array  $data = [] 
)
Parameters
string$className
array$data
Returns
mixed

Definition at line 29 of file ElementFactory.php.

30  {
31  $instance = $this->_objectManager->create($className, $data);
32  return $instance;
33  }
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31

Field Documentation

◆ $_objectManager

$_objectManager
protected

Definition at line 14 of file ElementFactory.php.


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