You are here

protected function SearchApiStatsBlock::getIndex in Search API Stats 8

Use the block derivative ID to retrieve the index object.

Return value

Drupal\search_api\Entity\Index The index object.

1 call to SearchApiStatsBlock::getIndex()
SearchApiStatsBlock::getServer in modules/search_api_stats_block/src/Plugin/Block/SearchApiStatsBlock.php
Retrieve the index and use it to get the server ID.

File

modules/search_api_stats_block/src/Plugin/Block/SearchApiStatsBlock.php, line 133

Class

SearchApiStatsBlock
Provides a 'SearchApiStatsBlock' block.

Namespace

Drupal\search_api_stats_block\Plugin\Block

Code

protected function getIndex() {
  $id = $this
    ->getDerivativeId();
  $result = Index::load($id);
  return $result;
}