Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Indexer\Fulltext\Action\Full::getSearchableProducts PHP Method

getSearchableProducts() public method

Load a bulk of product data.
public getSearchableProducts ( integer $storeId, string $productIds = null ) : array
$storeId integer Store id.
$productIds string Product ids filter.
return array
    public function getSearchableProducts($storeId, $productIds = null)
    {
        $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);
        }
        return $this->connection->fetchAll($select);
    }

Usage Example

Example #1
0
 /**
  * Load a bulk of product data.
  *
  * @param int    $storeId    Store id.
  * @param string $productIds Product ids filter.
  *
  * @return array
  */
 private function getSearchableProducts($storeId, $productIds = null)
 {
     return $this->resourceModel->getSearchableProducts($storeId, $productIds);
 }