Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FormFactory.php
Go to the documentation of this file.
1 <?php
9 
11 {
15  protected $_objectManager;
16 
20  public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
21  {
22  $this->_objectManager = $objectManager;
23  }
24 
36  public function create(
38  $formCode,
39  array $attributeValues = [],
40  $isAjax = false,
41  $ignoreInvisible = Form::IGNORE_INVISIBLE,
42  $filterAttributes = []
43  ) {
44  $params = [
45  'entityType' => $entityType,
46  'formCode' => $formCode,
47  'attributeValues' => $attributeValues,
48  'ignoreInvisible' => $ignoreInvisible,
49  'filterAttributes' => $filterAttributes,
50  'isAjax' => $isAjax,
51  ];
52  return $this->_objectManager->create(\Magento\Customer\Model\Metadata\Form::class, $params);
53  }
54 }
create( $entityType, $formCode, array $attributeValues=[], $isAjax=false, $ignoreInvisible=Form::IGNORE_INVISIBLE, $filterAttributes=[])
Definition: FormFactory.php:36
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
Definition: FormFactory.php:20
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18