Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-eav
Model
ResourceModel
Entity
Store.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Eav\Model\ResourceModel\Entity
;
7
8
use
Magento\Framework\Model\AbstractModel
;
9
use
Magento\Framework\DataObject
;
10
16
class
Store
extends
\Magento\Framework\Model\ResourceModel\Db\AbstractDb
17
{
24
protected
function
_construct
()
25
{
26
$this->
_init
(
'eav_entity_store'
,
'entity_store_id'
);
27
}
28
37
public
function
loadByEntityStore
(
AbstractModel
$object,
$entityTypeId
,
$storeId
)
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
}
$entityTypeId
$entityTypeId
Definition:
attribute_set_with_renamed_group.php:28
Magento\Framework\Model\ResourceModel\Db\AbstractDb\getMainTable
getMainTable()
Definition:
AbstractDb.php:264
Magento\Eav\Model\ResourceModel\Entity\Store\_construct
_construct()
Definition:
Store.php:24
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Framework\Model\AbstractModel\setData
setData($key, $value=null)
Definition:
AbstractModel.php:345
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Eav\Model\ResourceModel\Entity\Store\loadByEntityStore
loadByEntityStore(AbstractModel $object, $entityTypeId, $storeId)
Definition:
Store.php:37
Magento\Framework\Model\ResourceModel\Db\AbstractDb\_init
_init($mainTable, $idFieldName)
Definition:
AbstractDb.php:186
Magento\Eav\Model\ResourceModel\Entity\Store
Definition:
Store.php:16
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Model\ResourceModel\Db\AbstractDb
Definition:
AbstractDb.php:24
$connection
$connection
Definition:
bulk.php:13
Magento\Eav\Model\ResourceModel\Entity
Magento\Framework\Model\ResourceModel\Db\AbstractDb\_afterLoad
_afterLoad(\Magento\Framework\Model\AbstractModel $object)
Definition:
AbstractDb.php:641
Magento\Framework\Model\ResourceModel\Db\AbstractDb\getConnection
getConnection()
Definition:
AbstractDb.php:325
Magento\Framework\DataObject
Definition:
Cache.php:6