TestConnection.php 1.0 KB

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