You are here

public function SolrConfigSetController::streamSolrconfigRequestDispatcherXml in Search API Solr 8.3

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

Streams solrconfig_requestdispatcher.xml.

Parameters

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

Return value

\Symfony\Component\HttpFoundation\Response The HTTP response object.

Throws

\Drupal\search_api\SearchApiException

1 string reference to 'SolrConfigSetController::streamSolrconfigRequestDispatcherXml'
search_api_solr.routing.yml in ./search_api_solr.routing.yml
search_api_solr.routing.yml

File

src/Controller/SolrConfigSetController.php, line 215

Class

SolrConfigSetController
Provides different listings of SolrFieldType.

Namespace

Drupal\search_api_solr\Controller

Code

public function streamSolrconfigRequestDispatcherXml(ServerInterface $search_api_server) : Response {
  try {
    return $this
      ->streamXml('solrconfig_requestdispatcher.xml', $this
      ->getSolrconfigRequestDispatcherXml($search_api_server));
  } catch (SearchApiSolrConflictingEntitiesException $e) {
    $this
      ->messenger()
      ->addError($this
      ->t('Some enabled parts of the configuration conflict with others: @conflicts', [
      '@conflicts' => new FormattableMarkup($e, []),
    ]));
  }
  return new RedirectResponse($search_api_server
    ->toUrl('canonical')
    ->toString());
}