Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Store.php
Go to the documentation of this file.
1 <?php
7 
10 
17 {
24  protected function _construct()
25  {
26  $this->_init('eav_entity_store', 'entity_store_id');
27  }
28 
38  {
39  $connection = $this->getConnection();
40  $bind = [':entity_type_id' => $entityTypeId, ':store_id' => $storeId];
41  $select = $connection->select()->from(
42  $this->getMainTable()
43  )->forUpdate(
44  true
45  )->where(
46  'entity_type_id = :entity_type_id'
47  )->where(
48  'store_id = :store_id'
49  );
50  $data = $connection->fetchRow($select, $bind);
51 
52  if (!$data) {
53  return false;
54  }
55 
56  $object->setData($data);
57 
58  $this->_afterLoad($object);
59 
60  return true;
61  }
62 }
loadByEntityStore(AbstractModel $object, $entityTypeId, $storeId)
Definition: Store.php:37
$connection
Definition: bulk.php:13
_afterLoad(\Magento\Framework\Model\AbstractModel $object)
Definition: AbstractDb.php:641