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-search
Model
ResourceModel
SynonymGroup.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Search\Model\ResourceModel
;
7
8
use
Magento\Framework\Model\ResourceModel\Db\AbstractDb
;
9
14
class
SynonymGroup
extends
AbstractDb
15
{
24
public
function
getByScope
(
$websiteId
,
$storeId
)
25
{
26
$websiteIdField = $this->
getConnection
()
27
->quoteIdentifier(sprintf(
'%s.%s'
, $this->
getMainTable
(),
'website_id'
));
28
$storeIdField = $this->
getConnection
()
29
->quoteIdentifier(sprintf(
'%s.%s'
, $this->
getMainTable
(),
'store_id'
));
30
$select
= $this->
getConnection
()
31
->select()
32
->from($this->
getMainTable
(), [
'group_id'
,
'synonyms'
])
33
->where($websiteIdField .
'=?'
,
$websiteId
)
34
->where($storeIdField .
'=?'
,
$storeId
);
35
return
$this->
getConnection
()->fetchAll(
$select
);
36
}
37
44
protected
function
_construct
()
45
{
46
$this->
_init
(
'search_synonyms'
,
'group_id'
);
47
}
48
}
Magento\Framework\Model\ResourceModel\Db\AbstractDb\getMainTable
getMainTable()
Definition:
AbstractDb.php:264
$storeId
$storeId
Definition:
customer_review_with_rating.php:14
Magento\Search\Model\ResourceModel\SynonymGroup
Definition:
SynonymGroup.php:14
Magento\Framework\Model\ResourceModel\Db\AbstractDb\_init
_init($mainTable, $idFieldName)
Definition:
AbstractDb.php:186
Magento\Search\Model\ResourceModel\SynonymGroup\getByScope
getByScope($websiteId, $storeId)
Definition:
SynonymGroup.php:24
Magento\Search\Model\ResourceModel
Definition:
SynonymGroupTest.php:6
$select
$select
Definition:
catalog_rule_10_off_not_logged_rollback.php:14
Magento\Framework\Model\ResourceModel\Db\AbstractDb
Definition:
AbstractDb.php:24
Magento\Search\Model\ResourceModel\SynonymGroup\_construct
_construct()
Definition:
SynonymGroup.php:44
Magento\Framework\Model\ResourceModel\Db\AbstractDb\getConnection
getConnection()
Definition:
AbstractDb.php:325
$websiteId
$websiteId
Definition:
products_with_websites_and_stores.php:11