Commit 3b0da91b authored by borisson_'s avatar borisson_

Apply all fixes suggested by coder module

parent 7be5fc3b
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
} }
#facetapi-groups-list tr.facet-source { #facetapi-groups-list tr.facet-source {
border-top: 1px solid #E6E4DF; border-top: 1px solid #e6e4df;
} }
#facetapi-groups-list tr.facet:last-of-type { #facetapi-groups-list tr.facet:last-of-type {
border-bottom: 1px solid #E6E4DF; border-bottom: 1px solid #e6e4df;
} }
#facetapi-groups-list tr.facet-source .facetapi-type, #facetapi-groups-list tr.facet-source .facetapi-type,
...@@ -33,6 +33,6 @@ ...@@ -33,6 +33,6 @@
* Facet API Display page * Facet API Display page
*/ */
#edit-processors .facetapi-processor-settings { #edit-processors .facetapi-processor-settings {
margin-left: 20px; margin-left: 20px;
margin-bottom: 25px; margin-bottom: 25px;
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
*/ */
/** /**
* Alter the Facet API Query Type mapping * Alter the Facet API Query Type mapping.
* *
* Modules may implement this hook to alter the mapping that defines how a * Modules may implement this hook to alter the mapping that defines how a
* certain data type should be handled in Search API based Facets. * certain data type should be handled in Search API based Facets.
...@@ -25,4 +25,3 @@ function hook_facetapi_search_api_query_type_mapping_alter($backend_plugin_id, a ...@@ -25,4 +25,3 @@ function hook_facetapi_search_api_query_type_mapping_alter($backend_plugin_id, a
$query_types['string'] = 'search_api_solr_string'; $query_types['string'] = 'search_api_solr_string';
} }
} }
...@@ -46,4 +46,4 @@ class FacetApiEmptyBehavior extends Plugin { ...@@ -46,4 +46,4 @@ class FacetApiEmptyBehavior extends Plugin {
*/ */
public $description; public $description;
} }
\ No newline at end of file
...@@ -21,14 +21,14 @@ use Drupal\Component\Annotation\Plugin; ...@@ -21,14 +21,14 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiProcessor extends Plugin { class FacetApiProcessor extends Plugin {
/** /**
* The processor plugin id * The processor plugin id.
* *
* @var string * @var string
*/ */
public $id; public $id;
/** /**
* The human-readable name of the processor plugin * The human-readable name of the processor plugin.
* *
* @ingroup plugin_translatable * @ingroup plugin_translatable
* *
......
...@@ -22,14 +22,14 @@ use Drupal\Component\Annotation\Plugin; ...@@ -22,14 +22,14 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiQueryType extends Plugin { class FacetApiQueryType extends Plugin {
/** /**
* The query type plugin id * The query type plugin id.
* *
* @var string * @var string
*/ */
public $id; public $id;
/** /**
* The human-readable name of the query type plugin * The human-readable name of the query type plugin.
* *
* @ingroup plugin_translatable * @ingroup plugin_translatable
* *
......
...@@ -21,14 +21,14 @@ use Drupal\Component\Annotation\Plugin; ...@@ -21,14 +21,14 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiUrlProcessor extends Plugin { class FacetApiUrlProcessor extends Plugin {
/** /**
* The facet_manager plugin id * The facet_manager plugin id.
* *
* @var string * @var string
*/ */
public $id; public $id;
/** /**
* The human-readable name of the url processor plugin * The human-readable name of the url processor plugin.
* *
* @ingroup plugin_translatable * @ingroup plugin_translatable
* *
...@@ -52,4 +52,4 @@ class FacetApiUrlProcessor extends Plugin { ...@@ -52,4 +52,4 @@ class FacetApiUrlProcessor extends Plugin {
*/ */
public $derivative = ''; public $derivative = '';
} }
\ No newline at end of file
...@@ -22,14 +22,14 @@ use Drupal\Component\Annotation\Plugin; ...@@ -22,14 +22,14 @@ use Drupal\Component\Annotation\Plugin;
class FacetApiWidget extends Plugin { class FacetApiWidget extends Plugin {
/** /**
* The widget plugin id * The widget plugin id.
* *
* @var string * @var string
*/ */
public $id; public $id;
/** /**
* The human-readable name of the widget plugin * The human-readable name of the widget plugin.
* *
* @ingroup plugin_translatable * @ingroup plugin_translatable
* *
......
...@@ -12,7 +12,9 @@ use Drupal\Core\Plugin\Context\Context; ...@@ -12,7 +12,9 @@ use Drupal\Core\Plugin\Context\Context;
use Drupal\Core\Plugin\Context\ContextDefinition; use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\Plugin\Context\ContextProviderInterface; use Drupal\Core\Plugin\Context\ContextProviderInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\StringTranslationTrait;
/**
*
*/
class FacetContextProvider implements ContextProviderInterface { class FacetContextProvider implements ContextProviderInterface {
use StringTranslationTrait; use StringTranslationTrait;
...@@ -62,5 +64,4 @@ class FacetContextProvider implements ContextProviderInterface { ...@@ -62,5 +64,4 @@ class FacetContextProvider implements ContextProviderInterface {
return $contexts; return $contexts;
} }
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* @file * @file
* Contains Drupal\facetap\EmptyBehavior\EmptyBehaviorInterface * Contains Drupal\facetap\EmptyBehavior\EmptyBehaviorInterface.
*/ */
namespace Drupal\facetapi\EmptyBehavior; namespace Drupal\facetapi\EmptyBehavior;
......
<?php <?php
/** /**
* Contains \Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginBase * @file
* Contains \Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginBase.
*/ */
namespace Drupal\facetapi\EmptyBehavior; namespace Drupal\facetapi\EmptyBehavior;
...@@ -65,7 +66,7 @@ abstract class EmptyBehaviorPluginBase extends PluginBase implements EmptyBehavi ...@@ -65,7 +66,7 @@ abstract class EmptyBehaviorPluginBase extends PluginBase implements EmptyBehavi
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildConfigurationForm(array $form, FormStateInterface $form_state) { public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
return false; return FALSE;
} }
/** /**
...@@ -77,4 +78,5 @@ abstract class EmptyBehaviorPluginBase extends PluginBase implements EmptyBehavi ...@@ -77,4 +78,5 @@ abstract class EmptyBehaviorPluginBase extends PluginBase implements EmptyBehavi
* {@inheritdoc} * {@inheritdoc}
*/ */
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {} public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
}
\ No newline at end of file }
<?php <?php
/** /**
* Contains \Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginManager * @file
* Contains \Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginManager.
*/ */
namespace Drupal\facetapi\EmptyBehavior; namespace Drupal\facetapi\EmptyBehavior;
...@@ -17,7 +18,11 @@ use Drupal\Core\Plugin\DefaultPluginManager; ...@@ -17,7 +18,11 @@ use Drupal\Core\Plugin\DefaultPluginManager;
* @see \Drupal\facetapi\EmptyBehavior\EmptyBehaviorInterface * @see \Drupal\facetapi\EmptyBehavior\EmptyBehaviorInterface
*/ */
class EmptyBehaviorPluginManager extends DefaultPluginManager { class EmptyBehaviorPluginManager extends DefaultPluginManager {
/**
*
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/facetapi/empty_behavior', $namespaces, $module_handler, 'Drupal\facetapi\EmptyBehavior\EmptyBehaviorInterface', 'Drupal\facetapi\Annotation\FacetApiEmptyBehavior'); parent::__construct('Plugin/facetapi/empty_behavior', $namespaces, $module_handler, 'Drupal\facetapi\EmptyBehavior\EmptyBehaviorInterface', 'Drupal\facetapi\Annotation\FacetApiEmptyBehavior');
} }
}
\ No newline at end of file }
...@@ -9,7 +9,6 @@ namespace Drupal\facetapi\Entity; ...@@ -9,7 +9,6 @@ namespace Drupal\facetapi\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\facetapi\FacetInterface; use Drupal\facetapi\FacetInterface;
use Drupal\facetapi\Result\Result;
/** /**
* Defines the search index configuration entity. * Defines the search index configuration entity.
...@@ -178,7 +177,7 @@ class Facet extends ConfigEntityBase implements FacetInterface { ...@@ -178,7 +177,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
protected $only_visible_when_facet_source_is_visible; protected $only_visible_when_facet_source_is_visible;
/** /**
* Widget Plugin Manager * Widget Plugin Manager.
* *
* @var object * @var object
*/ */
...@@ -306,33 +305,54 @@ class Facet extends ConfigEntityBase implements FacetInterface { ...@@ -306,33 +305,54 @@ class Facet extends ConfigEntityBase implements FacetInterface {
return $this; return $this;
} }
/**
*
*/
public function getFieldIdentifier() { public function getFieldIdentifier() {
return $this->field_identifier; return $this->field_identifier;
} }
/**
*
*/
public function setFieldIdentifier($field_identifier) { public function setFieldIdentifier($field_identifier) {
$this->field_identifier = $field_identifier; $this->field_identifier = $field_identifier;
return $this; return $this;
} }
/**
*
*/
public function getQueryTypes() { public function getQueryTypes() {
return $this->query_type_name; return $this->query_type_name;
} }
/**
*
*/
public function setFieldEmptyBehavior($behavior_id) { public function setFieldEmptyBehavior($behavior_id) {
$this->empty_behavior = $behavior_id; $this->empty_behavior = $behavior_id;
return $this; return $this;
} }
/**
*
*/
public function getFieldEmptyBehavior() { public function getFieldEmptyBehavior() {
return $this->empty_behavior; return $this->empty_behavior;
} }
/**
*
*/
public function getUrlProcessorName() { public function getUrlProcessorName() {
// @Todo: for now if the url processor is not set, defualt to query_string. // @Todo: for now if the url processor is not set, defualt to query_string.
return isset($this->url_processor_name) ? $this->url_processor_name : 'query_string'; return isset($this->url_processor_name) ? $this->url_processor_name : 'query_string';
} }
/**
*
*/
public function getName() { public function getName() {
return $this->name; return $this->name;
} }
...@@ -402,6 +422,9 @@ class Facet extends ConfigEntityBase implements FacetInterface { ...@@ -402,6 +422,9 @@ class Facet extends ConfigEntityBase implements FacetInterface {
return $parameters; return $parameters;
} }
/**
*
*/
public function getResults() { public function getResults() {
return $this->results; return $this->results;
} }
...@@ -448,7 +471,7 @@ class Facet extends ConfigEntityBase implements FacetInterface { ...@@ -448,7 +471,7 @@ class Facet extends ConfigEntityBase implements FacetInterface {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getFacetSources($only_enabled = false) { public function getFacetSources($only_enabled = FALSE) {
if (!isset($this->facetSourcePlugins)) { if (!isset($this->facetSourcePlugins)) {
$this->facetSourcePlugins = []; $this->facetSourcePlugins = [];
...@@ -478,10 +501,16 @@ class Facet extends ConfigEntityBase implements FacetInterface { ...@@ -478,10 +501,16 @@ class Facet extends ConfigEntityBase implements FacetInterface {
return array_intersect_key($this->facetSourcePlugins, array_flip($this->facetSourcePlugins)); return array_intersect_key($this->facetSourcePlugins, array_flip($this->facetSourcePlugins));
} }
/**
*
*/
public function setPath($path) { public function setPath($path) {
$this->path = $path; $this->path = $path;
} }
/**
*
*/
public function getPath() { public function getPath() {
return $this->path; return $this->path;
} }
......
...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception; ...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception;
/** /**
* Represents an exception that occurred in some part of the Facet API. * Represents an exception that occurred in some part of the Facet API.
*/ */
class Exception extends \Exception { } class Exception extends \Exception {}
...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception; ...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception;
/** /**
* Represents an exception that occurred when calling an invalid processor. * Represents an exception that occurred when calling an invalid processor.
*/ */
class InvalidProcessorException extends \Exception { } class InvalidProcessorException extends \Exception {}
...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception; ...@@ -10,4 +10,4 @@ namespace Drupal\facetapi\Exception;
/** /**
* Represents an exception that occurred when calling an invalid query type. * Represents an exception that occurred when calling an invalid query type.
*/ */
class InvalidQueryTypeException extends \Exception { } class InvalidQueryTypeException extends \Exception {}
<?php <?php
/** /**
* @file * @file
* Contains Drupal\facetapi\FacetInterface * Contains Drupal\facetapi\FacetInterface.
*/ */
namespace Drupal\facetapi; namespace Drupal\facetapi;
use Drupal\Core\Config\Entity\ConfigEntityInterface; use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\facetapi\FacetSource\FacetSourceInterface; /**
use Drupal\facetapi\Result\ResultInterface; *
*/
interface FacetInterface extends ConfigEntityInterface { interface FacetInterface extends ConfigEntityInterface {
/** /**
* Sets the facet's widget plugin id. * Sets the facet's widget plugin id.
* *
* @param string $widget * @param string $widget
*
* @return $this * @return $this
*/ */
public function setWidget($widget); public function setWidget($widget);
...@@ -51,7 +52,7 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -51,7 +52,7 @@ interface FacetInterface extends ConfigEntityInterface {
*/ */
public function getFieldEmptyBehavior(); public function getFieldEmptyBehavior();
/** /**
* Set field identifier. * Set field identifier.
* *
* @return mixed * @return mixed
...@@ -91,6 +92,7 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -91,6 +92,7 @@ interface FacetInterface extends ConfigEntityInterface {
* Check if a value is active. * Check if a value is active.
* *
* @param string $value * @param string $value
*
* @return bool * @return bool
*/ */
public function isActiveValue($value); public function isActiveValue($value);
...@@ -171,7 +173,8 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -171,7 +173,8 @@ interface FacetInterface extends ConfigEntityInterface {
/** /**
* Gets the facet manager plugin id * Gets the facet manager plugin id.
*
* @return string * @return string
*/ */
public function getManagerPluginId(); public function getManagerPluginId();
...@@ -182,12 +185,14 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -182,12 +185,14 @@ interface FacetInterface extends ConfigEntityInterface {
* This is usually the name of the Search-api view. * This is usually the name of the Search-api view.
* *
* @param string $facet_source_id * @param string $facet_source_id
*
* @return $this * @return $this
*/ */
public function setFacetSourceId($facet_source_id); public function setFacetSourceId($facet_source_id);
/** /**
* Returns the Facet source id. * Returns the Facet source id.
*
* @return string * @return string
*/ */
public function getFacetSourceId(); public function getFacetSourceId();
...@@ -204,6 +209,7 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -204,6 +209,7 @@ interface FacetInterface extends ConfigEntityInterface {
* Load the facet sources for this facet. * Load the facet sources for this facet.
* *
* @param bool|TRUE $only_enabled * @param bool|TRUE $only_enabled
*
* @return FacetSourceInterface[] * @return FacetSourceInterface[]
*/ */
public function getFacetSources($only_enabled = TRUE); public function getFacetSources($only_enabled = TRUE);
...@@ -226,6 +232,7 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -226,6 +232,7 @@ interface FacetInterface extends ConfigEntityInterface {
* Returns an array of processors with their configuration. * Returns an array of processors with their configuration.
* *
* @param bool|TRUE $only_enabled * @param bool|TRUE $only_enabled
*
* @return \Drupal\facetapi\Processor\ProcessorInterface[] * @return \Drupal\facetapi\Processor\ProcessorInterface[]
*/ */
public function getProcessors($only_enabled = TRUE); public function getProcessors($only_enabled = TRUE);
...@@ -250,7 +257,7 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -250,7 +257,7 @@ interface FacetInterface extends ConfigEntityInterface {
/** /**
* Sets the "only visible when facet source is visible" boolean flag. * Sets the "only visible when facet source is visible" boolean flag.
* *
* @param boolean $only_visible_when_facet_source_is_visible * @param bool $only_visible_when_facet_source_is_visible
* A boolean flag indicating if the facet should be hidden on a page that * A boolean flag indicating if the facet should be hidden on a page that
* does not show the facet source. * does not show the facet source.
* *
...@@ -264,4 +271,5 @@ interface FacetInterface extends ConfigEntityInterface { ...@@ -264,4 +271,5 @@ interface FacetInterface extends ConfigEntityInterface {
* @return boolean * @return boolean
*/ */
public function getOnlyVisibleWhenFacetSourceIsVisible(); public function getOnlyVisibleWhenFacetSourceIsVisible();
} }
...@@ -13,7 +13,6 @@ use Drupal\Core\StringTranslation\StringTranslationTrait; ...@@ -13,7 +13,6 @@ use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginManager; use Drupal\facetapi\EmptyBehavior\EmptyBehaviorPluginManager;
use Drupal\facetapi\Exception\InvalidProcessorException; use Drupal\facetapi\Exception\InvalidProcessorException;
use Drupal\facetapi\FacetInterface; use Drupal\facetapi\FacetInterface;
use Drupal\facetapi\FacetSource\FacetSourceInterface;
use Drupal\facetapi\FacetSource\FacetSourcePluginManager; use Drupal\facetapi\FacetSource\FacetSourcePluginManager;
use Drupal\facetapi\Processor\BuildProcessorInterface; use Drupal\facetapi\Processor\BuildProcessorInterface;
use Drupal\facetapi\Processor\PreQueryProcessorInterface; use Drupal\facetapi\Processor\PreQueryProcessorInterface;
...@@ -21,7 +20,6 @@ use Drupal\facetapi\Processor\ProcessorInterface; ...@@ -21,7 +20,6 @@ use Drupal\facetapi\Processor\ProcessorInterface;
use Drupal\facetapi\Processor\ProcessorPluginManager; use Drupal\facetapi\Processor\ProcessorPluginManager;
use Drupal\facetapi\QueryType\QueryTypePluginManager; use Drupal\facetapi\QueryType\QueryTypePluginManager;
use Drupal\facetapi\Widget\WidgetPluginManager; use Drupal\facetapi\Widget\WidgetPluginManager;
use \Drupal\facetapi\Entity\Facet;
/** /**
* Base class for Facet API FacetManagers. * Base class for Facet API FacetManagers.
...@@ -303,7 +301,7 @@ class DefaultFacetManager { ...@@ -303,7 +301,7 @@ class DefaultFacetManager {
// enough to halt all further processing. This should probably go in an // enough to halt all further processing. This should probably go in an
// earlier step of the facet building process but here's fine for now. // earlier step of the facet building process but here's fine for now.
$facet_source = $facet->getFacetSource(); $facet_source = $facet->getFacetSource();
if(!$facet_source->isRenderedInCurrentRequest()){ if (!$facet_source->isRenderedInCurrentRequest()) {
return []; return [];
} }
} }
...@@ -321,9 +319,8 @@ class DefaultFacetManager { ...@@ -321,9 +319,8 @@ class DefaultFacetManager {
// Get the current results from the facets and let all processors that // Get the current results from the facets and let all processors that
// trigger on the build step do their build processing. // trigger on the build step do their build processing.
// @see \Drupal\facetapi\Processor\BuildProcessorInterface.
// @see \Drupal\facetapi\Processor\BuildProcessorInterface // @see \Drupal\facetapi\Processor\WidgetOrderProcessorInterface.
// @see \Drupal\facetapi\Processor\WidgetOrderProcessorInterface
$results = $facet->getResults(); $results = $facet->getResults();
foreach ($facet->getProcessors() as $processor) { foreach ($facet->getProcessors() as $processor) {
...@@ -339,7 +336,6 @@ class DefaultFacetManager { ...@@ -339,7 +336,6 @@ class DefaultFacetManager {
} }
$facet->setResults($results); $facet->setResults($results);
// Returns the render array, this render array contains the empty behaviour // Returns the render array, this render array contains the empty behaviour
// if no results are found. If there are results we're going to initialize // if no results are found. If there are results we're going to initialize
// the widget from the widget plugin manager and return it's build method. // the widget from the widget plugin manager and return it's build method.
...@@ -375,4 +371,5 @@ class DefaultFacetManager { ...@@ -375,4 +371,5 @@ class DefaultFacetManager {
$facet->setPath($facet_source_plugin->getPath()); $facet->setPath($facet_source_plugin->getPath());
} }
} }
} }
...@@ -12,8 +12,10 @@ use Drupal\Core\Entity\EntityTypeManager; ...@@ -12,8 +12,10 @@ use Drupal\Core\Entity\EntityTypeManager;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\StringTranslationTrait;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
/**
abstract class FacetSourceDeriverBase implements ContainerDeriverInterface { *
*/
abstract class FacetSourceDeriverBase implements ContainerDeriverInterface {
use StringTranslationTrait; use StringTranslationTrait;
...@@ -96,4 +98,5 @@ abstract class FacetSourceDeriverBase implements ContainerDeriverInterface { ...@@ -96,4 +98,5 @@ abstract class FacetSourceDeriverBase implements ContainerDeriverInterface {
public function compareDerivatives(array $a, array $b) { public function compareDerivatives(array $a, array $b) {
return strnatcasecmp($a['label'], $b['label']); return strnatcasecmp($a['label'], $b['label']);
} }
} }
...@@ -16,6 +16,7 @@ use Drupal\facetapi\FacetInterface; ...@@ -16,6 +16,7 @@ use Drupal\facetapi\FacetInterface;
* A facet source is used to abstract the data source where facets can be added * A facet source is used to abstract the data source where facets can be added
* to. A good example of this is a search api view. There are other possible * to. A good example of this is a search api view. There are other possible
* facet data sources, these all implement the FacetSourceInterface. * facet data sources, these all implement the FacetSourceInterface.
*
* @see plugin_api * @see plugin_api
*/ */
interface FacetSourceInterface { interface FacetSourceInterface {
...@@ -34,6 +35,7 @@ interface FacetSourceInterface { ...@@ -34,6 +35,7 @@ interface FacetSourceInterface {
* Fill in facet data in to the configured facets. * Fill in facet data in to the configured facets.
* *
* @param \Drupal\facetapi\FacetInterface[] $facets * @param \Drupal\facetapi\FacetInterface[] $facets
*
* @return mixed * @return mixed
*/