|
6 | 6 |
|
7 | 7 | namespace Magento\Search\Model\ResourceModel;
|
8 | 8 |
|
9 |
| -use Magento\Framework\App\Config\ScopeConfigInterface; |
10 | 9 | use Magento\Framework\DB\Helper\Mysql\Fulltext;
|
11 | 10 | use Magento\Framework\Exception\LocalizedException;
|
12 | 11 | use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
|
13 |
| -use Magento\Store\Model\ScopeInterface; |
14 | 12 | use Magento\Store\Model\Store;
|
15 | 13 | use Magento\Store\Model\StoreManagerInterface;
|
16 | 14 |
|
@@ -58,12 +56,12 @@ public function loadByPhrase(\Magento\Search\Model\SynonymReader $object, $phras
|
58 | 56 | $rows = $this->queryByPhrase(strtolower($phrase));
|
59 | 57 | $synsPerScope = $this->getSynRowsPerScope($rows);
|
60 | 58 |
|
61 |
| - if (!empty($synsPerScope[ScopeInterface::SCOPE_STORES])) { |
62 |
| - $object->setData($synsPerScope[ScopeInterface::SCOPE_STORES]); |
63 |
| - } elseif (!empty($synsPerScope[ScopeInterface::SCOPE_WEBSITES])) { |
64 |
| - $object->setData($synsPerScope[ScopeInterface::SCOPE_WEBSITES]); |
| 59 | + if (!empty($synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_STORES])) { |
| 60 | + $object->setData($synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_STORES]); |
| 61 | + } elseif (!empty($synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES])) { |
| 62 | + $object->setData($synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES]); |
65 | 63 | } else {
|
66 |
| - $object->setData($synsPerScope[ScopeConfigInterface::SCOPE_TYPE_DEFAULT]); |
| 64 | + $object->setData($synsPerScope[\Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT]); |
67 | 65 | }
|
68 | 66 | $this->_afterLoad($object);
|
69 | 67 | return $this;
|
@@ -163,9 +161,9 @@ private function getSynRowsPerScope($rows)
|
163 | 161 | $synRowsForDefault[] = $row;
|
164 | 162 | }
|
165 | 163 | }
|
166 |
| - $synsPerScope[ScopeInterface::SCOPE_STORES] = $synRowsForStoreView; |
167 |
| - $synsPerScope[ScopeInterface::SCOPE_WEBSITES] = $synRowsForWebsite; |
168 |
| - $synsPerScope[ScopeConfigInterface::SCOPE_TYPE_DEFAULT] = $synRowsForDefault; |
| 164 | + $synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_STORES] = $synRowsForStoreView; |
| 165 | + $synsPerScope[\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES] = $synRowsForWebsite; |
| 166 | + $synsPerScope[\Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT] = $synRowsForDefault; |
169 | 167 | return $synsPerScope;
|
170 | 168 | }
|
171 | 169 |
|
|
0 commit comments