You are here

public static function FacetsSummaryBlockDeriver::create in Facets 8

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

modules/facets_summary/src/Plugin/Block/FacetsSummaryBlockDeriver.php, line 34

Class

FacetsSummaryBlockDeriver
This deriver creates a block for every facet source.

Namespace

Drupal\facets_summary\Plugin\Block

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  $deriver = new static($container, $base_plugin_id);
  $deriver->facetsSummaryStorage = $container
    ->get('entity_type.manager')
    ->getStorage('facets_summary');
  return $deriver;
}