Skip to content

Commit 13ac5eb

Browse files
committed
MAGE-1281 Move lingering IS confg to discrete helper
1 parent 76af83d commit 13ac5eb

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Helper/ConfigHelper.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public function getAlgoliaCookieDuration($storeId = null)
308308
}
309309

310310
// --- Products --- //
311-
311+
312312
/**
313313
* @param $storeId
314314
* @return array
@@ -2038,15 +2038,12 @@ public function isInstantSearchBoxEnabled($storeId = null)
20382038
/**
20392039
* @param $storeId
20402040
* @return bool
2041-
* @deprecated This method will be moved to the InstantSearch config helper
2041+
* @deprecated This method has been moved to the InstantSearch config helper and will be removed in a future version
2042+
* @see \Algolia\AlgoliaSearch\Helper\Configuration\InstantSearchHelper::shouldShowSuggestionsOnNoResultsPage()
20422043
*/
20432044
public function showSuggestionsOnNoResultsPage($storeId = null)
20442045
{
2045-
return $this->configInterface->isSetFlag(
2046-
self::SHOW_SUGGESTIONS_NO_RESULTS,
2047-
ScopeInterface::SCOPE_STORE,
2048-
$storeId
2049-
);
2046+
return $this->instantSearchConfig->shouldShowSuggestionsOnNoResultsPage($storeId);
20502047
}
20512048

20522049
/**

Helper/Configuration/InstantSearchHelper.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ public function setSorting(
132132
);
133133
}
134134

135+
public function shouldShowSuggestionsOnNoResultsPage(?int $storeId = null): bool
136+
{
137+
return $this->configInterface->isSetFlag(
138+
self::SHOW_SUGGESTIONS_NO_RESULTS,
139+
ScopeInterface::SCOPE_STORE,
140+
$storeId
141+
);
142+
}
143+
135144
public function isSearchBoxEnabled(?int $storeId = null): bool
136145
{
137146
return $this->isEnabled($storeId)

0 commit comments

Comments
 (0)