Commit 02480074 authored by Nick_vh's avatar Nick_vh

Adapting the adapter to use the interface correctly

parent 055df3fa
......@@ -2,7 +2,7 @@
/**
* @file
* Contains Drupal\facetapi\Plugin\AdapterBase.
* Contains Drupal\facetapi\Plugin\Adapter\AdapterBase.
*/
namespace Drupal\facetapi\Plugin\Adapter;
......@@ -65,28 +65,6 @@ abstract class AdapterBase extends PluginBase implements AdapterInterface {
*/
protected $queryTypes = array();
/**
* Returns a boolean flagging whether facets in a realm shoud be displayed.
*
* Useful, for example, for suppressing sidebar blocks in some cases. Apache
* Solr Search Integration used this method to prevent blocks from being
* displayed when the module was configured to render them in the search body
* on "empty" searches instead of the normal facet location.
*
* @param string $realm_name
* The machine readable name of the realm.
*
* @return boolean
* A boolean flagging whether to display a given realm.
*
* @todo It appears that no implementing modules are leveraging this anymore.
* Let's discuss whether to deprecate this method or even remove it from
* future versions of Facet API at http://drupal.org/node/1661410.
*/
public function suppressOutput($realm_name) {
return false;
}
/**
* @TODO: generalize to ProcessorInterface and properly type hint in __construct().
* The url processor plugin associated with this adapter.
......@@ -202,7 +180,9 @@ abstract class AdapterBase extends PluginBase implements AdapterInterface {
* Let's discuss whether to deprecate this method or even remove it from
* future versions of Facet API at http://drupal.org/node/1661410.
*/
abstract public function suppressOutput($realm_name);
public function suppressOutput($realm_name) {
return false;
}
/**
* Loads the URL processor associated with this adapter.
......
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