public function addStoreFilter($storeIds)
{
$defaultStoreId = Store::DEFAULT_STORE_ID;
if (!is_array($storeIds)) {
$storeIds = [$storeIds];
}
if (!in_array($defaultStoreId, $storeIds)) {
$storeIds[] = $defaultStoreId;
}
$this->getSelect()->join(['store_table' => $this->getTable(ThesaurusInterface::STORE_TABLE_NAME)], 'main_table.' . ThesaurusInterface::THESAURUS_ID . ' = store_table.' . ThesaurusInterface::THESAURUS_ID, [])->where('store_table.store_id IN (?)', $storeIds)->group('main_table.' . ThesaurusInterface::THESAURUS_ID);
return $this;
}