diff --git a/config/schema/facets.processor.schema.yml b/config/schema/facets.processor.schema.yml index 743e321..a651391 100644 --- a/config/schema/facets.processor.schema.yml +++ b/config/schema/facets.processor.schema.yml @@ -31,6 +31,9 @@ plugin.plugin_configuration.facets_processor.count_limit: plugin.plugin_configuration.facets_processor.url_processor_handler: type: config_object +plugin.plugin_configuration.facets_processor.sort_processor_handler: + type: config_object + plugin.plugin_configuration.facets_processor.hide_non_narrowing_result_processor: type: config_object diff --git a/src/Form/FacetDisplayForm.php b/src/Form/FacetDisplayForm.php index 312356f..1f5cd03 100644 --- a/src/Form/FacetDisplayForm.php +++ b/src/Form/FacetDisplayForm.php @@ -14,11 +14,11 @@ use Drupal\Core\Entity\EntityTypeManager; use Drupal\Core\Form\FormStateInterface; use Drupal\facets\Processor\ProcessorInterface; use Drupal\facets\Processor\ProcessorPluginManager; +use Drupal\facets\SortProcessor\SortProcessorInterface; use Drupal\facets\SortProcessor\SortProcessorPluginManager; use Drupal\facets\UrlProcessor\UrlProcessorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\facets\Widget\WidgetPluginManager; -use Drupal\facets\Processor\WidgetOrderProcessorInterface; /** * Provides a form for configuring the processors of a facet. @@ -522,7 +522,7 @@ class FacetDisplayForm extends EntityForm { /** @var \Drupal\facets\Processor\ProcessorInterface $processor */ $processors = $facet->getProcessors(FALSE); foreach ($processors as $processor_id => $processor) { - $form_container_key = $processor instanceof WidgetOrderProcessorInterface ? 'facet_sorting' : 'facet_settings'; + $form_container_key = $processor instanceof SortProcessorInterface ? 'facet_sorting' : 'facet_settings'; if (empty($values[$form_container_key][$processor_id]['status'])) { $facet->removeProcessor($processor_id); continue; diff --git a/src/Plugin/facets/processor/SortProcessorHandler.php b/src/Plugin/facets/processor/SortProcessorHandler.php index ae63d21..c2a33f6 100644 --- a/src/Plugin/facets/processor/SortProcessorHandler.php +++ b/src/Plugin/facets/processor/SortProcessorHandler.php @@ -13,15 +13,10 @@ use Drupal\facets\Processor\BuildProcessorInterface; use Drupal\facets\Processor\ProcessorPluginBase; /** - * The URL processor handler triggers the actual url processor. - * - * The URL processor handler allows managing the weight of the actual URL - * processor per Facet. This handler will trigger the actual. - * - * @FacetsUrlProcessor, which can be configured on the Facet source. + * The sort processor handler to manager the sorting. * * @FacetsProcessor( - * id = "Sort_processor_handler", + * id = "sort_processor_handler", * label = @Translation("Sort handler"), * description = @Translation("Handles sorting of results."), * stages = {