-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1850 from acquia/ACMS-4070
ACMS-4070: Fixed the search_api_none plugin does not exist error.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
modules/acquia_cms_search/src/Plugin/views/cache/SearchApiNoneCacheBC.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Drupal\acquia_cms_search\Plugin\views\cache; | ||
|
||
use Drupal\views\Plugin\views\cache\None; | ||
use Drupal\views\ResultRow; | ||
|
||
/** | ||
* Provides backward compatibility for search_api_none views cache type. | ||
* | ||
* This views_cache plugin was introduced in search_api:8.x-1.33, & search_api | ||
* dropped support for Drupal Core 9.x starting from search_api:8.x-1.31. | ||
* | ||
* @see https://www.drupal.org/project/search_api/issues/3423063. | ||
* | ||
* @ingroup views_cache_plugins | ||
* | ||
* @ViewsCache( | ||
* id = "search_api_none_bc", | ||
* title = @Translation("Search API (none)"), | ||
* help = @Translation("No caching of Views data.") | ||
* ) | ||
*/ | ||
class SearchApiNoneCacheBC extends None { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getRowId(ResultRow $row) { | ||
return $row->search_api_id; | ||
} | ||
|
||
} |