public function SolrFieldTypeController::getConfigZip in Search API Solr 8.2
Same name and namespace in other branches
- 8.3 src/Controller/SolrFieldTypeController.php \Drupal\search_api_solr\Controller\SolrFieldTypeController::getConfigZip()
- 4.x src/Controller/SolrFieldTypeController.php \Drupal\search_api_solr\Controller\SolrFieldTypeController::getConfigZip()
Provides a zip archive containing a complete Solr configuration.
Parameters
\Drupal\search_api\ServerInterface $search_api_server:
Return value
array A render array as expected by drupal_render().
1 string reference to 'SolrFieldTypeController::getConfigZip'
File
- src/
Controller/ SolrFieldTypeController.php, line 76
Class
- SolrFieldTypeController
- Provides different listings of SolrFieldType.
Namespace
Drupal\search_api_solr\ControllerCode
public function getConfigZip(ServerInterface $search_api_server) {
@ob_clean();
try {
/** @var \ZipStream\ZipStream $zip */
$zip = $this
->getListBuilder($search_api_server)
->getConfigZip();
$zip
->finish();
@ob_end_flush();
exit;
} catch (\Exception $e) {
watchdog_exception('search_api', $e);
\Drupal::messenger()
->addError($this
->t('An error occured during the creation of the config.zip. Look at the logs for details.'));
}
return [];
}