You are here

protected function AbstractSolrEntityController::getListBuilder in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x src/Controller/AbstractSolrEntityController.php \Drupal\search_api_solr\Controller\AbstractSolrEntityController::getListBuilder()

Gets the list builder.

Ensures that the list builder uses the correct Solr backend.

Parameters

\Drupal\search_api\ServerInterface $search_api_server: The Search API server entity.

Return value

\Drupal\search_api_solr\Controller\AbstractSolrEntityListBuilder The SolrRequestHandler list builder object.

Throws

\Drupal\search_api\SearchApiException

File

src/Controller/AbstractSolrEntityController.php, line 78

Class

AbstractSolrEntityController
Provides different listings of Solr Entities.

Namespace

Drupal\search_api_solr\Controller

Code

protected function getListBuilder(ServerInterface $search_api_server) {

  /** @var \Drupal\search_api_solr\Controller\AbstractSolrEntityListBuilder $list_builder */
  $list_builder = $this
    ->entityTypeManager()
    ->getListBuilder($this->entityTypeId);
  $list_builder
    ->setServer($search_api_server);
  return $list_builder;
}