Build a list of synonyms into the Lucene format (foo,bar).

@param int $storeId Store id.

@return string[]
559727
public function getSynonyms($storeId)
    {
        $connection = $this->getConnection();
        $select     = $this->getBaseSelect($storeId, ThesaurusInterface::TYPE_SYNONYM);

        $select->columns(['terms' => new \Zend_Db_Expr('GROUP_CONCAT(terms.term)')]);

        return $connection->fetchCol($select);
    }
577513
private function filterStore($storeId = null)
    {
        if ($storeId !== null) {
            if (!is_array($storeId)) {
                $storeId = explode(',', $storeId);
            }
            $this->orderCollection->addFieldToFilter('store_id', ['in' => $storeId]);
        }

        return $this;
    }
779001
public function getSessionData($storeId, $sessionIds)
    {
        $data = [];
        $searchRequest  = $this->getSearchRequest($storeId, $sessionIds);
        $searchResponse = $this->searchEngine->search($searchRequest);

        foreach ($searchResponse->getAggregations()->getBucket('session_id')->getValues() as $sessionValue) {
            $sessionData = $this->processSessionData($sessionValue);
            $sessionData['store_id'] = $storeId;
            unset($sessionData['count']);

            $data[] = array_filter($sessionData);
        }

        return $data;
    }
500136
private function getSearchRequest($storeId, $sessionIds)
    {
        $queryFilters = ['session.uid' => $sessionIds];

        return $this->searchRequestBuilder->create($storeId, self::SEARCH_REQUEST_CONTAINER, 0, 0, null, [], [], $queryFilters);
    }
988140
public function getProductBlacklist($categoryId, $storeId)
    {
        $select = $this->getBaseSelect()
            ->columns(['product_id'])
            ->where('category_id = ?', (int) $categoryId)
            ->where('store_id = ?', (int) $storeId)
            ->where('is_blacklisted = ?', (int) true);

        return $this->getConnection()->fetchCol($select);
    }
524588
public function getTotalsChangeSelectors($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_TOTALS_CHANGE_SELECTORS,
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
131703
public function getAttributesRawData($storeId, array $entityIds, $tableName, array $attributeIds)
    {
        $select = $this->connection->select();

        // The field modelizing the link between entity table and attribute values table. Either row_id or entity_id.
        $linkField = $this->getEntityMetaData($this->getEntityTypeId())->getLinkField();

        // The legacy entity_id field.
        $entityIdField = $this->getEntityMetaData($this->getEntityTypeId())->getIdentifierField();

        $joinStoreValuesConditionClauses = [
            "t_default.$linkField = t_store.$linkField",
            't_default.attribute_id = t_store.attribute_id',
            't_store.store_id= ?',
        ];

        $joinStoreValuesCondition = $this->connection->quoteInto(
            implode(' AND ', $joinStoreValuesConditionClauses),
            $storeId
        );

        $select->from(['entity' => $this->getEntityMetaData($this->getEntityTypeId())->getEntityTable()], [$entityIdField])
            ->joinInner(
                ['t_default' => $tableName],
                new \Zend_Db_Expr("entity.{$linkField} = t_default.{$linkField}"),
                ['attribute_id']
            )
            ->joinLeft(['t_store' => $tableName], $joinStoreValuesCondition, [])
            ->where('t_default.store_id=?', 0)
            ->where('t_default.attribute_id IN (?)', $attributeIds)
            ->where("entity.{$entityIdField} IN (?)", $entityIds)
            ->columns(['value' => new \Zend_Db_Expr('COALESCE(t_store.value, t_default.value)')]);

        return $this->connection->fetchAll($select);
    }
1173458
public function getStoreQuotesFromQuoteIds($quoteIds, $storeId)
    {
        $salesCollection = $this->quoteCollection->create()
            ->addFieldToFilter('is_active', 1)
            ->addFieldToFilter('items_count', ['gt' => 0])
            ->addFieldToFilter('customer_email', ['neq' => ''])
            ->addFieldToFilter('entity_id', ['in' => $quoteIds]);

        if ($this->helper->isOnlySubscribersForAC($storeId)) {
            $salesCollection = $this->subscriberFilterer->filterBySubscribedStatus($salesCollection);
        }

        return $salesCollection;
    }
162653
private function getSearchableProducts($storeId, $productIds = null, $fromId = 0, $limit = 10000)
    {
        return $this->resourceModel->getSearchableProducts($storeId, $productIds, $fromId, $limit);
    }
654444
public function getSearchableProducts($storeId, $productIds = null, $fromId = 0, $limit = 1000)
    {
        $select = $this->getConnection()->select()
            ->from(['e' => $this->getTable('catalog_product_entity')]);

        $this->addIsVisibleInStoreFilter($select, $storeId);

        if ($productIds !== null) {
            $select->where('e.entity_id IN (?)', $productIds);
        }

        $select->limit($limit);
        $select->where('e.entity_id > ?', $fromId);
        $select->order('e.entity_id');

        return $this->connection->fetchAll($select);
    }
1300513
private function getSearchableCategories($storeId, $categoryIds = null, $fromId = 0, $limit = 100)
    {
        return $this->resourceModel->getSearchableCategories($storeId, $categoryIds, $fromId, $limit);
    }
1264432
public function getActiveCarriers($storeId = null)
    {
        return $this->carrierConfig->getActiveCarriers($this->storeManager->getStore($storeId));
    }
954816
public function reindex($storeId, $synonyms, $expansions)
    {
        $indexIdentifier = ThesaurusIndex::INDEX_IDENTIER;
        $indexName       = $this->indexSettingsHelper->createIndexNameFromIdentifier($indexIdentifier, $storeId);
        $indexAlias      = $this->indexSettingsHelper->getIndexAliasFromIdentifier($indexIdentifier, $storeId);
        $indexSettings   = ['settings' => $this->getIndexSettings($synonyms, $expansions)];
        $this->client->createIndex($indexName, $indexSettings);
        $this->indexManager->proceedIndexInstall($indexName, $indexAlias);
        $this->cacheHelper->cleanIndexCache(ThesaurusIndex::INDEX_IDENTIER, $storeId);
    }
236485
public function getReplaceSelectors($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_REPLACE_SELECTORS,
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
873171
public function getTransportConfig($storeId)
    {
        $config = [
            'port' => $this->getSmtpPort($storeId),
            'auth' => 'login',
            'username' => $this->getSmtpUsername($storeId),
            'password' => $this->getSmtpPassword($storeId),
            'ssl' => 'tls',
        ];

        if ($this->isDebugEnabled($storeId)) {
            $this->_logger->debug('Mail transport config : ' . implode(',', $config));
        }

        return $config;
    }
532484
private function getSmtpUsername($storeId = null)
    {
        return $this->scopeConfig->getValue(
            self::XML_PATH_DDG_TRANSACTIONAL_USERNAME,
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
380573
public function getProductByIdAndStore($id, $storeId)
    {
        $product = $this->productFactory->create()
            ->getCollection()
            ->addIdFilter($id)
            ->setStoreId($storeId)
            ->addAttributeToSelect(
                ['product_url', 'name', 'store_id', 'small_image']
            )
            ->setPage(1, 1);

        return $product->getFirstItem();
    }