You are here

protected function AbstractSolrEntityListBuilder::mergeSolrConfigs in Search API Solr 8.3

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

Merge two Solr config entities.

Parameters

\Drupal\search_api_solr\SolrConfigInterface $target: The target Solr config entity.

\Drupal\search_api_solr\SolrConfigInterface $source: The source Solr config entity.

1 call to AbstractSolrEntityListBuilder::mergeSolrConfigs()
AbstractSolrEntityListBuilder::load in src/Controller/AbstractSolrEntityListBuilder.php

File

src/Controller/AbstractSolrEntityListBuilder.php, line 277

Class

AbstractSolrEntityListBuilder
Provides a listing of Solr Entities.

Namespace

Drupal\search_api_solr\Controller

Code

protected function mergeSolrConfigs(SolrConfigInterface $target, SolrConfigInterface $source) {
  if (empty($target
    ->getSolrConfigs()) && !empty($source
    ->getSolrConfigs())) {
    $target
      ->setSolrConfigs($source
      ->getSolrConfigs());
  }
}