Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Element.php
Go to the documentation of this file.
1 <?php
7 
14 {
20  protected function _construct()
21  {
22  $this->_init('eav_form_element', 'element_id');
23  $this->addUniqueField(
24  ['field' => ['type_id', 'attribute_id'], 'title' => __('Form Element with the same attribute')]
25  );
26  }
27 
36  protected function _getLoadSelect($field, $value, $object)
37  {
38  $select = parent::_getLoadSelect($field, $value, $object);
39  $select->join(
40  $this->getTable('eav_attribute'),
41  $this->getTable('eav_attribute') . '.attribute_id = ' . $this->getMainTable() . '.attribute_id',
42  ['attribute_code', 'entity_type_id']
43  );
44 
45  return $select;
46  }
47 }
_getLoadSelect($field, $value, $object)
Definition: Element.php:36
__()
Definition: __.php:13
$value
Definition: gender.phtml:16