Commit 8cde322f authored by borisson_'s avatar borisson_ Committed by borisson_
Browse files

Issue #2657442 by borisson_: Fix the getPath method of the CoreNodeSearchFacetSource

parent bf7f3bec
......@@ -98,11 +98,11 @@ class CoreNodeSearchFacetSource extends FacetSourcePluginBase implements CoreSea
* {@inheritdoc}
*/
public function getPath() {
/*$view = Views::getView($this->pluginDefinition['view_id']);
$view->setDisplay($this->pluginDefinition['view_display']);
$view->execute();
return $view->getDisplay()->getOption('path');*/
$request = \Drupal::requestStack()->getMasterRequest();
$search_page = $request->attributes->get('entity');
if ($search_page instanceof SearchPageInterface) {
return '/' . $search_page->getPath();
}
return '';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment