You are here

public function FacetsSummaryBlock::calculateDependencies in Facets 8

Overrides BlockPluginTrait::calculateDependencies

File

modules/facets_summary/src/Plugin/Block/FacetsSummaryBlock.php, line 119

Class

FacetsSummaryBlock
Exposes a summary based on all the facets as a block.

Namespace

Drupal\facets_summary\Plugin\Block

Code

public function calculateDependencies() {
  $source_id = $this
    ->getDerivativeId();
  if ($summary = FacetsSummary::load($source_id)) {
    return [
      $summary
        ->getConfigDependencyKey() => [
        $summary
          ->getConfigDependencyName(),
      ],
    ];
  }
  return [];
}