Loading README.txt +2 −2 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ CONTENTS OF THIS FILE INTRODUCTION ------------ The Facets module allows site builders to easily create and manage faceted search interfaces. The Facets module allows site builders to easily create and manage faceted search interfaces. REQUIREMENTS Loading facets.module +3 −5 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Component\Utility\Html; use Drupal\Core\Breadcrumb\Breadcrumb; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Link; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; Loading Loading @@ -235,7 +234,7 @@ function facets_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInter } foreach ($facet_sources_definitions as $definition) { /* @var \Drupal\facets\FacetSource\FacetSourcePluginBase $facet_source_plugin */ /** @var \Drupal\facets\FacetSource\FacetSourcePluginBase $facet_source_plugin */ $facetsource_id = $definition['id']; $facet_source_plugin = $facet_source_manager->createInstance($facetsource_id); Loading Loading @@ -298,11 +297,11 @@ function facets_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInter } } // TODO find a better way to construct the url for a crumb maybe url // @todo find a better way to construct the url for a crumb maybe url // processor will have a function to get params for a result // without all the other request parameters; with this we could implement: // @see https://www.drupal.org/node/2861586 // TODO handle not grouped facets. // @todo handle not grouped facets. /** @var \Drupal\facets\Result\ResultInterface[] $facet_results */ foreach ($active_results as $facet_id => $facet_results) { $facet_used_result[$facet_id] = []; Loading Loading @@ -340,7 +339,6 @@ function facets_language_switch_links_alter(array &$links, $type, Url $url) { $alterer->alter($links, $type, $url); } /** * Implements hook_form_FORM_ID_alter(). */ Loading modules/facets_range_widget/facets_range_widget.module→modules/facets_range_widget/facets_range_widget.install +0 −0 File moved. View file modules/facets_range_widget/src/Plugin/facets/widget/RangeSliderWidget.php +4 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,10 @@ class RangeSliderWidget extends SliderWidget { $min = $facet_settings['min']; $max = $facet_settings['max']; $facet_settings['values'] = [isset($active[0][0]) ? (float) $active[0][0] : $min, isset($active[0][1]) ? (float) $active[0][1] : $max]; $facet_settings['values'] = [ isset($active[0][0]) ? (float) $active[0][0] : $min, isset($active[0][1]) ? (float) $active[0][1] : $max, ]; return $build; } Loading modules/facets_rest/src/Plugin/views/style/FacetsSerializer.php +4 −4 Original line number Diff line number Diff line Loading @@ -112,12 +112,12 @@ class FacetsSerializer extends Serializer { $facets_metadata = []; foreach ($facets as $facet) { $processed_facets[] = $this->facetsManager->build($facet); $facets_metadata[$facet->id()] = array( $facets_metadata[$facet->id()] = [ 'label' => $facet->label(), 'weight' => $facet->getWeight(), 'field_id' => $facet->getFieldIdentifier(), 'url_alias' => $facet->getUrlAlias() ); 'url_alias' => $facet->getUrlAlias(), ]; } uasort($facets_metadata, function ($a, $b) { return (int) $a['weight'] - $b['weight']; Loading Loading
README.txt +2 −2 Original line number Diff line number Diff line Loading @@ -14,8 +14,8 @@ CONTENTS OF THIS FILE INTRODUCTION ------------ The Facets module allows site builders to easily create and manage faceted search interfaces. The Facets module allows site builders to easily create and manage faceted search interfaces. REQUIREMENTS Loading
facets.module +3 −5 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ use Drupal\Component\Utility\Html; use Drupal\Core\Breadcrumb\Breadcrumb; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Link; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; Loading Loading @@ -235,7 +234,7 @@ function facets_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInter } foreach ($facet_sources_definitions as $definition) { /* @var \Drupal\facets\FacetSource\FacetSourcePluginBase $facet_source_plugin */ /** @var \Drupal\facets\FacetSource\FacetSourcePluginBase $facet_source_plugin */ $facetsource_id = $definition['id']; $facet_source_plugin = $facet_source_manager->createInstance($facetsource_id); Loading Loading @@ -298,11 +297,11 @@ function facets_system_breadcrumb_alter(Breadcrumb &$breadcrumb, RouteMatchInter } } // TODO find a better way to construct the url for a crumb maybe url // @todo find a better way to construct the url for a crumb maybe url // processor will have a function to get params for a result // without all the other request parameters; with this we could implement: // @see https://www.drupal.org/node/2861586 // TODO handle not grouped facets. // @todo handle not grouped facets. /** @var \Drupal\facets\Result\ResultInterface[] $facet_results */ foreach ($active_results as $facet_id => $facet_results) { $facet_used_result[$facet_id] = []; Loading Loading @@ -340,7 +339,6 @@ function facets_language_switch_links_alter(array &$links, $type, Url $url) { $alterer->alter($links, $type, $url); } /** * Implements hook_form_FORM_ID_alter(). */ Loading
modules/facets_range_widget/facets_range_widget.module→modules/facets_range_widget/facets_range_widget.install +0 −0 File moved. View file
modules/facets_range_widget/src/Plugin/facets/widget/RangeSliderWidget.php +4 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,10 @@ class RangeSliderWidget extends SliderWidget { $min = $facet_settings['min']; $max = $facet_settings['max']; $facet_settings['values'] = [isset($active[0][0]) ? (float) $active[0][0] : $min, isset($active[0][1]) ? (float) $active[0][1] : $max]; $facet_settings['values'] = [ isset($active[0][0]) ? (float) $active[0][0] : $min, isset($active[0][1]) ? (float) $active[0][1] : $max, ]; return $build; } Loading
modules/facets_rest/src/Plugin/views/style/FacetsSerializer.php +4 −4 Original line number Diff line number Diff line Loading @@ -112,12 +112,12 @@ class FacetsSerializer extends Serializer { $facets_metadata = []; foreach ($facets as $facet) { $processed_facets[] = $this->facetsManager->build($facet); $facets_metadata[$facet->id()] = array( $facets_metadata[$facet->id()] = [ 'label' => $facet->label(), 'weight' => $facet->getWeight(), 'field_id' => $facet->getFieldIdentifier(), 'url_alias' => $facet->getUrlAlias() ); 'url_alias' => $facet->getUrlAlias(), ]; } uasort($facets_metadata, function ($a, $b) { return (int) $a['weight'] - $b['weight']; Loading