123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\CatalogSearch\Model;
- use Magento\Framework\App\Config\ScopeConfigInterface;
- use Magento\Framework\Data\Collection\AbstractDb as DbCollection;
- use Magento\Framework\Model\Context;
- use Magento\Framework\Model\ResourceModel\AbstractResource;
- use Magento\Framework\Registry;
- use Magento\Search\Model\QueryFactory;
- /**
- * Catalog advanced search model
- *
- * @method int getProductId()
- * @method \Magento\CatalogSearch\Model\Fulltext setProductId(int $value)
- * @method int getStoreId()
- * @method \Magento\CatalogSearch\Model\Fulltext setStoreId(int $value)
- * @method string getDataIndex()
- * @method \Magento\CatalogSearch\Model\Fulltext setDataIndex(string $value)
- *
- * @deprecated 101.0.0
- * @see \Magento\ElasticSearch
- */
- class Fulltext extends \Magento\Framework\Model\AbstractModel
- {
- /**
- * Catalog search data
- *
- * @var QueryFactory
- */
- protected $queryFactory = null;
- /**
- * Core store config
- *
- * @var ScopeConfigInterface
- */
- protected $_scopeConfig;
- /**
- * @param Context $context
- * @param Registry $registry
- * @param QueryFactory $queryFactory
- * @param ScopeConfigInterface $scopeConfig
- * @param AbstractResource $resource
- * @param DbCollection $resourceCollection
- * @param array $data
- */
- public function __construct(
- Context $context,
- Registry $registry,
- QueryFactory $queryFactory,
- ScopeConfigInterface $scopeConfig,
- AbstractResource $resource = null,
- DbCollection $resourceCollection = null,
- array $data = []
- ) {
- $this->queryFactory = $queryFactory;
- $this->_scopeConfig = $scopeConfig;
- parent::__construct($context, $registry, $resource, $resourceCollection, $data);
- }
- /**
- * @return void
- */
- protected function _construct()
- {
- $this->_init(\Magento\CatalogSearch\Model\ResourceModel\Fulltext::class);
- }
- /**
- * Reset search results cache
- *
- * @return $this
- * @deprecated 101.0.0 Not used anymore
- * @see \Magento\CatalogSearch\Model\ResourceModel\Fulltext::resetSearchResultsByStore
- */
- public function resetSearchResults()
- {
- $this->getResource()->resetSearchResults();
- return $this;
- }
- }
|