/** * {@inheritdoc} */ protected function _prepareCollection() { $this->setCollection($this->collectionFactory->create()); return parent::_prepareCollection(); }
/** * Is stopword? * * @param string $word * @param int $storeId * @return bool */ public function isStopWord($word, $storeId) { $collection = $this->collectionFactory->create()->addFieldToFilter('term', $word)->addFieldToFilter('store_id', $storeId); $result = $collection->getSize(); return $result; }