TestConnection.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Elasticsearch\Block\Adminhtml\System\Config\Elasticsearch5;
  7. /**
  8. * Elasticsearch 5x test connection block
  9. * @codeCoverageIgnore
  10. */
  11. class TestConnection extends \Magento\AdvancedSearch\Block\Adminhtml\System\Config\TestConnection
  12. {
  13. /**
  14. * {@inheritdoc}
  15. */
  16. protected function _getFieldMapping()
  17. {
  18. $fields = [
  19. 'engine' => 'catalog_search_engine',
  20. 'hostname' => 'catalog_search_elasticsearch5_server_hostname',
  21. 'port' => 'catalog_search_elasticsearch5_server_port',
  22. 'index' => 'catalog_search_elasticsearch5_index_prefix',
  23. 'enableAuth' => 'catalog_search_elasticsearch5_enable_auth',
  24. 'username' => 'catalog_search_elasticsearch5_username',
  25. 'password' => 'catalog_search_elasticsearch5_password',
  26. 'timeout' => 'catalog_search_elasticsearch5_server_timeout',
  27. ];
  28. return array_merge(parent::_getFieldMapping(), $fields);
  29. }
  30. }