GlobalSearch.php 982 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Block;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. class GlobalSearch extends \Magento\Backend\Block\Template
  12. {
  13. /**
  14. * @var string
  15. */
  16. protected $_template = 'Magento_Backend::system/search.phtml';
  17. /**
  18. * Get components configuration
  19. * @return array
  20. */
  21. public function getWidgetInitOptions()
  22. {
  23. return [
  24. 'suggest' => [
  25. 'dropdownWrapper' => '<div class="autocomplete-results" ></div >',
  26. 'template' => '[data-template=search-suggest]',
  27. 'termAjaxArgument' => 'query',
  28. 'source' => $this->getUrl('adminhtml/index/globalSearch'),
  29. 'filterProperty' => 'name',
  30. 'preventClickPropagation' => false,
  31. 'minLength' => 2,
  32. 'submitInputOnEnter' => false,
  33. ]
  34. ];
  35. }
  36. }