commit 49ebd8f2169778e0c52563d1ee7d671a1a1bc92f Author: Pasan Gamage Date: Wed Jun 21 12:42:41 2017 +1000 RelatedSearchesBlock class diff --git a/src/Plugin/Block/RelatedSearchesBlock.php b/src/Plugin/Block/RelatedSearchesBlock.php new file mode 100644 index 0000000..88919b5 --- /dev/null +++ b/src/Plugin/Block/RelatedSearchesBlock.php @@ -0,0 +1,34 @@ +getParameter('search_query'); + $results = $searcher->getRelatedSearches($query); + return ['#theme' => 'item_list', '#items' => $results]; + } + + public function getCacheContexts() { + return array_merge(parent::getCacheContexts(), ['url']); + } + +}