Patch to review for the work that needed to move back to facet api @ #2600442: Add support for Facet Api in Drupal 8

CommentFileSizeAuthor
#7 2610764-7.patch7.57 KBNick_vh
#4 2610764-4.patch7.68 KBNick_vh
#2 2610764-1.patch7.65 KBNick_vh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nick_vh created an issue. See original summary.

Nick_vh’s picture

FileSize
7.65 KB
Nick_vh’s picture

  1. +++ b/facetapi.api.php
    @@ -0,0 +1,28 @@
    + * @see \Drupal\search_api\Backend\BackendPluginBase
    

    Should be @see \Drupal\facetapi\Plugin\facetapi\facet_source\SearchApiBaseFacetSource

  2. +++ b/src/Plugin/facetapi/facet_source/SearchApiBaseFacetSource.php
    @@ -10,6 +10,7 @@ use Drupal\Core\Form\FormStateInterface;
    +use \Drupal\search_api\Backend\BackendInterface;
    

    Remove leading \

Nick_vh’s picture

Status: Active » Needs review
FileSize
7.68 KB
Nick_vh’s picture

+++ b/src/Plugin/facetapi/facet_source/SearchApiBaseFacetSource.php
@@ -100,15 +101,74 @@ abstract class SearchApiBaseFacetSource extends FacetSourcePluginBase {
+    // @todo Make this flexible for each data type in Search API.

Should we do that in this patch already? Is this something we can tackle later or how should we handle that default mapping?

borisson_’s picture

  1. +++ b/facetapi.api.php
    @@ -0,0 +1,28 @@
    + * Modules may implement this hook to alter the mapping that defines how
    + * a certain data type should be handled in Search API based Facets.
    

    80 cols.

  2. +++ b/src/Plugin/facetapi/facet_source/SearchApiBaseFacetSource.php
    @@ -100,15 +101,74 @@ abstract class SearchApiBaseFacetSource extends FacetSourcePluginBase {
    +  /**
    +   *
    +   *
    +   * @param
    +   * @param string $data_type
    +   *
    +   * @return array $query_types
    +   */
    

    What is this doing here?

I have some style nitpicks, otherwise this looks great.

Nick_vh’s picture

FileSize
7.57 KB
Nick_vh’s picture

Status: Needs review » Fixed

Committed

  • Nick_vh committed 7be5fc3 on 8.x-1.x
    Issue #2610764 by Nick_vh: Move Query Types back to Facet APi
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.