Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PropertyMapper.php
Go to the documentation of this file.
1 <?php
9 
11 
13 {
22  public function map(array $input, $entityTypeId)
23  {
24  return [
25  'attribute_model' => $this->_getValue($input, 'attribute_model'),
26  'backend_model' => $this->_getValue($input, 'backend'),
27  'backend_type' => $this->_getValue($input, 'type', 'varchar'),
28  'backend_table' => $this->_getValue($input, 'table'),
29  'frontend_model' => $this->_getValue($input, 'frontend'),
30  'frontend_input' => $this->_getValue($input, 'input', 'text'),
31  'frontend_label' => $this->_getValue($input, 'label'),
32  'frontend_class' => $this->_getValue($input, 'frontend_class'),
33  'source_model' => $this->_getValue($input, 'source'),
34  'is_required' => $this->_getValue($input, 'required', 1),
35  'is_user_defined' => $this->_getValue($input, 'user_defined', 0),
36  'default_value' => $this->_getValue($input, 'default'),
37  'is_unique' => $this->_getValue($input, 'unique', 0),
38  'note' => $this->_getValue($input, 'note'),
39  'is_global' => $this->_getValue(
40  $input,
41  'global',
42  \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL
43  )
44  ];
45  }
46 }